-1

I want URL rewriting solution. I have this URL [http://dailyimage.in/photo.php/1480] and I want to hide .php or [http://dailyimage.in/photo/1480] this type URL

Now I am using this code but it's not working in my .htaccess file

RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
1

1 Answer 1

1

Try instead of using %{REQUEST_FILENAME}.php using %{REQUEST_URI}.php in your rewrite destination :

RewriteEngine on

RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_URI}.php [QSA,L]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.