i have a quite interesting problem. 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?
thanks for reply, Nintendo. so, it's really not possible to use : as i want? why www.server.com/articles/order:date works and www.server.com/order:date does not? i think, there is not problem in rewriting rules, because when i call link www.server.com/order:date only access.log file is modified and rewrite.log and error.log files are not touched by apache. when i call www.server.com/articles/order:date, there is possible to see new records in access.log and rewrite.log logs. when i use : or | as delimiter signs, link www.server.com/order:date 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. so, can you explain me it to make my apache knowledges deeper? thanks in advance
Nintendo, here is my .htaccess: RewriteCond %{SCRIPT_FILENAME} !/index\.php RewriteCond %{REQUEST_URI} !/.+\..+$ RewriteCond %{REQUEST_URI} !/$ RewriteCond %{SERVER_PORT} !^443$ RewriteRule (.*) http://%{HTTP_HOST}/$1/ [L,QSA] RewriteCond %{SCRIPT_FILENAME} !/index\.php RewriteRule ^(([a-z]{2})(/))?(.*)$ index.php?p1=$2&p2=$4 [NC,L,QSA] in your answer to reyotech you wrote to use URLs that look like static URLs. this means use www.server.com/articles/article-1 or www.server.com/articles/article-1.html ?
Both are just as good. Options +FollowSymLinks +Indexes RewriteEngine on RewriteBase / RewriteRule ^([^.]+)/([^.]+)\.html$ index.php?p1=$1&p2=$2 [L] RewriteRule ^articles/([^.]+)/([^.]+)\.html$ articles/index.php?p1=$1&p2=$2 [L] domain.com/index.php?p1=order&p2=date.htm to domain.com/order/date.html the second code is if you have them in the articles directory.
Nintendo, thanks for your reply and opinion, but my rewrite rules in .htaccess work properly, so i don't need any help in there. i just need to know the reason of non-rewriting the www.server.com/order:date url...