Answer the question
In order to leave comments, you need to log in
Redirect in .htaccess?
Comrades! Here such question arose.
There are a number of links like site.com/?1, site.com/?2, and so on.
All links that have a question mark "?" with any continuation, redirect to the main site.com page.
Thank you for your attention! :)
Answer the question
In order to leave comments, you need to log in
You are here - this is a description of modRewrite on Habré + in the footer of the topic, a link to the full Russian-language manual.
Something like this:
RewriteRule ^(/\?.*)$ http://site.com/index.php?$1 [QSA,L]
And what about redirection? Requests "/?.*" are sent to the main page, and for this it is enough to register DirectoryIndex index.html index.php index.htm index.py index.pl index.asp
(Remove unnecessary, add what you need)
(You need mod_dir to work)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question