Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to redirect a page form show.php?id=(15charstring) to show/(15charstring)

I tried like this it is doing reverse means it is redirecting /show/(15chars) to show.php?id=(15chars)

RewriteEngine on
RewriteRule ^/show/([a-zA-Z0-9]{15})$ http://site.com/show.php?id=$1

Second case is i have to redirect to another page if he added &m=true to the url

show.php?id=(15chars)&m=true 

html/show.php?id=(15chars).
share|improve this question

closed as off topic by Sathya Jun 27 '12 at 9:55

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
What Sathya didn't do was to say that this would be better over on Stack Overflow: stackoverflow.com/search?q=htaccess+rewrite –  Julian Knight Jun 27 '12 at 10:11
add comment

1 Answer 1

RewriteEngine on
RewriteRule ^show/([^/]{15})$   show.php?id=$1  [L]
share|improve this answer
    
The requested URL /show/4de34rwa7eg70sw was not found on this server –  vvr Jun 27 '12 at 9:51
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.