Portal Home > Knowledgebase > Articles Database > Mod_rewrite + direct www to non-www not working together


Mod_rewrite + direct www to non-www not working together




Posted by strom73, 10-09-2012, 06:56 AM
Hello, I have mod_rewrite enabled on my forum. The code looks like this in .htaccess: Now, I want to redirect WWW to non-www with this code: When I add the code to the end of the file, it starts to redirect www.myforum.eu/page1.html to the index.php file because of the "RewriteRule . /index.php. How could I get both www to non-www and mod_rewrite SEO friendly URL's working?

Posted by strom73, 10-09-2012, 03:13 PM
Could someone help me, please?

Posted by Grumps, 10-10-2012, 01:34 AM
Put your www redirect first. Also, useful: http://stackoverflow.com/questions/2...www-to-non-www

Posted by strom73, 10-10-2012, 03:47 AM
Works, thanks. I don't know why I didn't try it before, I thought I did...



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Ms-sql resources (Views: 779)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.