Welcome! Log In Create A New Profile

Advanced

Verifying the rewrite

Posted by hazenvnn 
Verifying the rewrite
March 31, 2011 12:14PM
I have a apache htaccess file as follow

RewriteEngine on

RewriteRule \.(css|jpe?g|gif|png|js|ico)$ - [L]

RewriteRule ^(admin|install).*$ - [L]

# Rewrite web pages to one master page
RewriteRule ^([^/\.]+)/?$ index.php?page=$1 [QSA,L]
RewriteRule ^([^/\.]+)/([^/]+)/?$ index.php?page=$1&id=$2 [QSA,L]
RewriteRule ^([^/\.]+)/([^/]+)/([^/]+)/? index.php?page=$1&id=$2&subpage=$3 [QSA,L]

I converted to

server {
rewrite /\.(css|jpe?g|gif|png|js|ico)$ last;
rewrite ^/(admin|install).*$ last;
rewrite ^/([^/\.]+)/?$ /index.php?page=$1 last;
rewrite ^/([^/\.]+)/([^/]+)/?$ /index.php?page=$1&id=$2 last;
rewrite ^/([^/\.]+)/([^/]+)/([^/]+)/? /index.php?page=$1&id=$2&subpage=$3 last;
}

Is it correct? I believe there is some problem as it is not working
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 209
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready