Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Htaccess Redirecting Questions


scaggster - 1:43 pm on Jan 28, 2013 (gmt 0)


Thanks for the reply

On the rewrite url

RewriteRule ^(([^/]+/)*[^/.]+)\.(html|php)$ http://www.example.com/$1.html [R=301,L]

On my site the PHP page redirects arent working now, (i fixed the typo in my htaccess after posting, so i tried this

RewriteRule ^(([^/]+/)*[^/.]+)\.php$ http://www.example.com/$1.php [R=301,L]

Both with and without brackets around the PHP and it doesnt redirect yet using this does

RewriteRule ^(.*)\.php$ http://www.example.com/$1.php [R=301,L]

Whats weird is that for example this wasnt redirecting before (sudomain.example.com/index.php?page=8 to example.com/index.php?page=8) but now it is so thanks massively.


Thread source:: http://www.webmasterworld.com/apache/4537934.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com