Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

apache rewrite "web.de/page/order:date" works, "web.de/order:date

Status
Not open for further replies.

martinno

Programmer
May 15, 2007
2
SK
i have a quite interesting problem with apache and it mod_rewrite.

i use mod_rewrite to have "nice and cool urls" on my server. everything works fine. i decided to add new functionality:
<parameter-name>:<parameter-value> (e.g. order:date for order by date)

when i call www.server.com/articles/order:date apache displays articles page with ordered articles by date, so rewriting works properly. but when i try to call www.server.com/order:date to order articles on title page, apache does "nothing" - apache does not rewrite the url and it try to display page /order:date :

Forbidden
You don't have permission to access /order:date on this server.


(but if i replace : delimiter by ~ or ! or @ (and some other signs), rewriting works ok also for www.server.com/order~date. rewriting also does not worl for | delimiter.)

i have really no idea what's going wrong. any suggestions?
 
i think, there is not problem in rewriting rules, because when i call link access.log file is modified only. rewrite.log and error.log files are not touched by apache.

when i call there is possible to see new records in access.log and rewrite.log logs.

as i have already mentioned, when i use : and | as delimiter signs, link is not rewritten. but when i use e.g. ~ or @ or ! it works ok. that's the second reason why i think it's not due my rewrite rules.

but here are my rewrite rules:

RewriteCond %{SCRIPT_FILENAME} !/index\.php
RewriteCond %{REQUEST_URI} !/.+\..+$
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) [L,QSA]

RewriteCond %{SCRIPT_FILENAME} !/index\.php
RewriteCond %{REQUEST_URI} !/.+\..+$
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{SERVER_PORT} ^443$
RewriteRule (.*) [L,QSA]

RewriteCond %{SCRIPT_FILENAME} !/index\.php
RewriteRule ^(([a-z]{2})(/))?(.*)$ index.php?p1=$2&p2=$4 [NC,L,QSA]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top