Redirect 301 of the old url
- riga75
-
Topic Author
- Offline
- New Member
-
17 years 10 months ago #852
by riga75
Riga75
www.tregima.it
ok I have understood but in the event in which the URL they were for example:
joomla.sakic.net/index.php?option=com_co...d=9&id=81&Itemid=145 and not
joomla.sakic.net/content/view/1/2/
the redirect would work the same one?
joomla.sakic.net/index.php?option=com_co...d=9&id=81&Itemid=145 and not
joomla.sakic.net/content/view/1/2/
the redirect would work the same one?
Riga75
www.tregima.it
Please Log in or Create an account to join the conversation.
- Saka
-
- Offline
- Administrator
-
17 years 10 months ago #853
by Saka
Emir Sakic
www.sakic.net
Non-sef URLs will not redirect. Only old SEF links.
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- zoro
-
- Offline
- New Member
-
17 years 2 months ago #2118
by zoro
In the Custom component strings I changed from mtree=>business to mtree=>directory
and changed Alias from business to directory
and defined in Redirects:
Source URL: business/
Target URL: directory/
Type: 301 Moved Permanently
How come the old SEF Advanced URLs containing prefix business/ gave me error 404: Not Found instead of replacing them to URLs containing prefix directory/ ???
I have tried to define the full URL but got the same error, eg business/abc.html and directory/abc.html
I have read SEF Advance Help and this Forum, but do not know what I did wrong or what/where else should I define ? I am using version 5.5.5 and any help would be much appreciated.
and changed Alias from business to directory
and defined in Redirects:
Source URL: business/
Target URL: directory/
Type: 301 Moved Permanently
How come the old SEF Advanced URLs containing prefix business/ gave me error 404: Not Found instead of replacing them to URLs containing prefix directory/ ???
I have tried to define the full URL but got the same error, eg business/abc.html and directory/abc.html
I have read SEF Advance Help and this Forum, but do not know what I did wrong or what/where else should I define ? I am using version 5.5.5 and any help would be much appreciated.
Please Log in or Create an account to join the conversation.
- Saka
-
- Offline
- Administrator
-
17 years 2 months ago #2119
by Saka
Emir Sakic
www.sakic.net
Defining the full URL correctly should work. It will not work for business/* -> directory/*, every URL needs to be redirected separately. More advanced redirects must be set in .htaccess.
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- zoro
-
- Offline
- New Member
-
17 years 2 months ago #2120
by zoro
I have removed Redirect definations in SEF Advance and used cPanel > Domains > Redirects tool to define permanently (301) and checked redirects with and without www:
abc.com/business => www.abc.com/directory
Then used FTP to check .htaccess file that has been inserted automatically by cPanel the last 3 lines at the bottom:
DirectoryIndex index.php
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
RewriteCond %{HTTP_HOST} ^abc.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.abc.com$
RewriteRule ^directory/$ www.abc.com/business/ [R=301,L]
I then used FireFox browser to visit a valid SEF Advance URL, then replaced in the URL the folder name /business/ with /directory/ and pressed enter (and later refresh button), but I still got error 404: Not Found !!
--
I have tried with the slash / after folder names but got the same error 404:
abc.com/business/ => www.abc.com/directory/
I have also tried with the wildcard * after folder name/ but got the same error 404:
abc.com/business/* => www.abc.com/directory/*
RewriteCond %{HTTP_HOST} ^abc.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.abc.com$
RewriteRule ^directory/?(.*)$ www.abc.com/business/$1 [R=301,L]
Help please !
abc.com/business => www.abc.com/directory
Then used FTP to check .htaccess file that has been inserted automatically by cPanel the last 3 lines at the bottom:
DirectoryIndex index.php
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
RewriteCond %{HTTP_HOST} ^abc.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.abc.com$
RewriteRule ^directory/$ www.abc.com/business/ [R=301,L]
I then used FireFox browser to visit a valid SEF Advance URL, then replaced in the URL the folder name /business/ with /directory/ and pressed enter (and later refresh button), but I still got error 404: Not Found !!
--
I have tried with the slash / after folder names but got the same error 404:
abc.com/business/ => www.abc.com/directory/
I have also tried with the wildcard * after folder name/ but got the same error 404:
abc.com/business/* => www.abc.com/directory/*
RewriteCond %{HTTP_HOST} ^abc.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.abc.com$
RewriteRule ^directory/?(.*)$ www.abc.com/business/$1 [R=301,L]
Help please !
Please Log in or Create an account to join the conversation.
- zoro
-
- Offline
- New Member
-
17 years 2 months ago #2121
by zoro
Sorry the last line in each case should have been as follows but still did not work:
RewriteRule ^business/$ www.abc.com/directory/ [R=301,L]
RewriteRule ^business/?(.*)$ www.abc.com/directory/$1 [R=301,L]
RewriteRule ^business/$ www.abc.com/directory/ [R=301,L]
RewriteRule ^business/?(.*)$ www.abc.com/directory/$1 [R=301,L]
Please Log in or Create an account to join the conversation.