regex - htaccess already stripping ".php" but need a sub page with url query -


After

Here's what I have so far ...

  RewriteCond% RewriteEngine Running {} REQUEST_FILENAME! -f RewriteCond% {REQUEST_FILENAME}! -d RewriteCond% {QUERY_STRING} ^ (. *) $ RewriteRule ^ (. *) $ $ 1.php?% 1 [NC, L, QSA]   

then site.com/ page site.com/page.php works for viewing.

I want to add one to it on a special page where there is a query string ... Example: site.com/song.php?name=song-name- & gt; I want to be site.com/song/Song-Name.

I know there are so many posts like this and I have seen through a ton but it does not understand how to get it done.

"itemprop =" text ">

You need a new rule to handle / song / URI Will be:

  Option -MultiViews RewriteEngine RewriteCond% {on REQUEST_FILENAME}! -f RewriteRule ^ Songs /(.+)$ song.php? Name = $ 1 [L, QSA, NC] RewriteCond% {} REQUEST_FILENAME! -f RewriteCond% {REQUEST_FILENAME}! -d RewriteRule ^ (. +?) /? $$ 1.php [l]   

I have also corrected my 2 rules since the query string has already been added to the targeted.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -