php - htaccess not working due to some mystical issue -


i'm running windows 7 xampp server has apache , has lines needed uncomment work fine.

however when try use rewriterule bump problem.

when write wrong code @ start of htaccess throws error 500, there few commands works, when use rewriterule ignore part , unless if write syntax wise wrong reacts error, have never seen link changed.

.htaccess file placed @ mydomain directory

can possibly issue of software or it's code?

i have dynamic link:

http://localhost//mydomain/folder/ad.php?title=thetitle&id=1 

and need this:

http://localhost//mydomain/folder/thetitle/1 

my htaccess file looks this:

rewriteengine on rewritebase /mydomain/folder rewritecond %{request_uri} ^/ad.php$ [nc] rewritecond %{query_string} ^title=(.*)&id=(.*)$ rewriterule (.*) http://localhost/mydomain/folder/%1/%2.aspx? [r=301,l] 

any highly honored :)

you can have these rules in /mydomain/folder/.htaccess:

rewriteengine on rewritebase /mydomain/folder/  rewritecond %{the_request} /ad\.php\?title=([^\s&]+)&id=([^\s&]+) [nc] rewriterule ^ %1/%2? [r=302,l]  rewriterule ^([^/.]+)/([0-9]+)/?$ ad.php?title=$1&id=$2 [l,qsa] 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -