How to use .htaccess to fix php errors

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

romulus
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Sep 23, 2012 10:49 pm

How to use .htaccess to fix php errors

Postby romulus » Wed Sep 26, 2012 3:05 pm

Can .htaccess fix the erratic url partially in the middle or URL?

When php is brokem and url output has double entry in it like:

mysite.eu/album/index.phpindex.php?album=%2F2008%2F2008_alldogs

I have tried to remove unsuccessfully second index.php with following .htassess line:

RewriteRule ^index.phpindex.php(.*)$ /index.php [L,R=301]

The expected result would look like: mysite.eu/album/index.php?album=%2F2008%2F2008_alldogs

If it should work, then, what I do wrong?

Thanks

Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 1 guest