URL canonicalization pretty url
Permalink
Hi,
I would like to redirect all of thehttp://fxwire.com requests to thehttp://www.fxwire.com domain. The problem is that I have the pretty urls turned on and it is not working with my code. I updated the .htaccess file:
It is only work if there is the index.php in the url otherwise it goes to the homepage. For example
fxwire.com/market_analysis/technical_analysis/
this goes to this:
http://www.fxwire.com/index.php...
but
fxwire.com/index.php/market_analysis/technical_analysis/
this goes to this:
http://www.fxwire.com/index.php/market_analysis/technical_analysis/...
As you can see if the index.php is in the url it works fine, anyway it doesn't. I want it to work without the index.php in the url. Please help to me with this one.
Thanks
Levente
I would like to redirect all of thehttp://fxwire.com requests to thehttp://www.fxwire.com domain. The problem is that I have the pretty urls turned on and it is not working with my code. I updated the .htaccess file:
RewriteEngine On RewriteCond %{HTTP_HOST} !^www.fxwire.com$ RewriteRule (.*) http://www.fxwire.com/$1 [R=301,L] # -- concrete5 urls start -- <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}/index.html !-f RewriteCond %{REQUEST_FILENAME}/index.php !-f RewriteRule . index.php [L] </IfModule> # -- concrete5 urls end --
It is only work if there is the index.php in the url otherwise it goes to the homepage. For example
fxwire.com/market_analysis/technical_analysis/
this goes to this:
http://www.fxwire.com/index.php...
but
fxwire.com/index.php/market_analysis/technical_analysis/
this goes to this:
http://www.fxwire.com/index.php/market_analysis/technical_analysis/...
As you can see if the index.php is in the url it works fine, anyway it doesn't. I want it to work without the index.php in the url. Please help to me with this one.
Thanks
Levente
Anyway, maybe this will help for someone else as well.
Regards,
Levente