1

Im having some issues with my htaccess rewriting rules after a server move.

For any reason my old directive is not working any more.

My htacess has the following line:

RewriteEngine On
RewriteRule ^ads/mobile/([a-z0-9_-]+)/?$ /ads.php?ptid=6&tube_id=$1 [NC,L]

I dont get any 500 or 404 error. The url bar shows the url in rewrite mode OK, but php doesnt take the GET var from the rewritten url.

If I access to ads.php with the vars on the url, it works perfect.

Any idea? I changed from NC,L to QSA and also I deleted the "/" before ads.php but nothing works.

I will aprreciate any help. I searched for something similar here but nothing works for me.

2
  • Note: mod_rewrite is enable in apache Commented Jan 23, 2014 at 21:17
  • This is n working example RewriteRule ^(.+)$ index.php?url=$1 [QSA,L], if it helps. Commented Jan 23, 2014 at 21:21

2 Answers 2

1

That is most likely due to enabling of MultiViews option.

Turn it off by putting this line on top of your .htaccess:

Options -MultiViews
Sign up to request clarification or add additional context in comments.

Comments

0

Finally it was my fault. It didnt work because I didnt change from NONE to ALL the allowoverride settings on the file /etc/apache2/(site)

It works now! Thanks

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.