php - Friendly URL (Mod Rewrite) not working over Parked Domains -


i'm trying set friendly urls work parked domains also. have following .htaccess file:

rewriteengine on  redirectmatch ^/$ http://www.example.com/home/ redirectmatch ^/[index.php|index.html|index.html]$ http://www.example.com/home/  rewritecond  %{request_uri} ^/home[/]*$ rewriterule ^/home[/]*$ http://www.example.com/container.php?page=index [p]  rewritecond  %{request_uri} [a-z]*[|/](images|styles|javascripts|includes)(.*) rewriterule [a-z]*[|/](images|styles|javascripts|includes)(.*) http://www.example.com/$1/$2 [p]  rewritecond  %{request_uri} !(images/|styles/|javascripts/|includes/)  rewriterule ([a-z]*)[/]$ http://www.example.com/container.php?page=$1 [p] rewritecond %{http_host} ^example\.com$ [or] rewritecond %{http_host} ^www\.example\.com$ rewriterule ^/?$ "http\:\/\/www\.example\.com\/home\/" [r=301,l] 

the principle url http://www.example.co.uk/win, http://www.example.com/win load page http://www.example.com/container.php?page=win or http://www.example.co.uk/games, http://www.example.com/games load page http://www.example.com/container.php?page=games. i've added rules exclude images, javascript, styles , includes directories.

if user goes http://www.example.co.uk/index(.php or .htm or .html) redirect http://www.example.com/home/.

for reason code isn't working. don't understand why not. appreciated.

your using both mod_alias , mod_rewrite, don't believe need exclude static content because routing 4 static entries. clean .htaccess file , give try.

rewriteengine on  rewriterule ^/$ http://www.example.com/home/ rewriterule ^index.(html|php|htm)$ http://www.example.com/home/  rewritecond  %{request_uri} !(images\/|styles\/|javascripts/|includes/)  rewriterule  ^([a-za-z]*)/$ http://www.example.com/container.php?page=$1 [p] 

Comments