htaccess index.php?

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

26-May-13 14:18
Hi all,

I'm editing my htaccess to try and get rid of the index.php? in my url's that appear on the website i.e.

http://www.michelledaniels.co.uk/photos/index.php?/categories

However the best I can manage is to remove the index.php but not the question mark

My htaccess is as below, any ideas :-



# Externally redirect client requests contains htm/html extension to extensionless URL
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*[^.]+\index.php\?

# externally redirect to extensionless URI
RewriteRule ^(([^/]+/)*[^.]+)\index.php/?$ http://www.michelledaniels.co.uk/$1 [R=301,L]

# and if requested extensionless URL-path plus ".htm" does resolve to an existing file

RewriteCond %{REQUEST_FILENAME}index.php? -f
# then append ".htm" to resolve the actual filename
RewriteRule ^(([^/]+/)*[^/]+)\?$ $1.php [L]


Many thanks

Paul
27-May-13 16:58
Don't put it in the rewrite rule.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/

 
New posts
Old posts

Follow Elated