3
Contributors
5
Replies
29
Views
4 Years
Discussion Span
Last Post by dorco
0

thanks pixelsoul

RewriteEngine On
RewriteRule ^([^/]*)$ /?sura=$1 [L]
RewriteRule ^([^/]*)/$ /?sura=$1 [L]
RewriteRule ^([^/]*)/([^/]*)$ /?sura=$1&ayat=$2 [L]
RewriteRule ^([^/]*)/([^/]*)/$ /?sura=$1&ayat=$2 [L]

This is not working

but only this works

    RewriteRule ^([^/]*)/([^/]*)$ /?sura=$1&ayat=$2 [L]
    RewriteRule ^([^/]*)/([^/]*)/$ /?sura=$1&ayat=$2 [L]
1

try this:

RewriteRule ^([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)$ /?sura=$1&ayat=$2 [L]
RewriteRule ^([a-zA-Z0-9-]+)$ /?sura=$1 [L]

they must be in this order, in case there is only 1 param, the second rule will be 'executed'. also you may want to limit the type of characters that params can take.

Votes + Comments
thanks
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.