|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
.htaccess rewrite with question mark "?"
Hi,
I want to 'escape a question mark' in htaccess' URL rewrite, but from what I have seen online, this is not as simple as escaping the character with a forward slash / This is my code: Code:
RewriteRule ^browse/(.*)/(.*)/(.*)$ browse.php?do=posts&url_supercat_sef_url=$1&url_cat_sef_url=$2&$3 [L] Which basically takes a url like http://www.mydomain.com/browse/automobile/cars/row=1 and sends it to browse.php?do=posts&url_supercat_sef_url=automobile&url_cat_sef_url=cars&row=1 However, I want the same for a url with a question mark like this: http://www.mydomain.com/browse/automobile/cars/?row=1 Is it possible for me to 'escape' the question mark in htaccess? I tried this Code:
RewriteRule ^browse/(.*)/(.*)/\?(.*)$ browse.php?do=posts&url_supercat_sef_url=$1&url_cat_sef_url=$2&$3 [L] but it does not work ![]() TIA |
|
#2
|
||||
|
||||
|
You have to use a RewriteCond with the %{QUERY_STRING} variable to match against the query string (anything after ? in the originally requested URL).
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > .htaccess rewrite with question mark "?" |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|