Virtual Directory

Discuss practical ways rearrange URLs using mod_rewrite.

Virtual Directory

Postby foxmask » Sat Jul 05, 2003 1:07 am

Hi
i would like to rewrite :
Code: Select all
http://domain.com/premium/the/rest/of/the/path/to/my/page.shtml

to
Code: Select all
http://domain.com/index.php?url=/the/rest/of/the/path/to/my/page.shtml

so i tried this :
Code: Select all
RewriteRule ^/premium/(.*\.shtml)$  /index.php?url=$1  [L]

but have a 404 Error when i access to http://domain.com/premium/the/rest/of/t ... page.shtml


any idea?

regards.
foxmask
 
Posts: 2
Joined: Sat Jul 05, 2003 1:01 am

Postby foxmask » Sat Jul 05, 2003 1:44 am

and the winners Rewriterules is :

RewriteRule ^/premium(.+) /index.php?url=$1 [PT]
foxmask
 
Posts: 2
Joined: Sat Jul 05, 2003 1:01 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 79 guests

cron