Help
-
Search
-
Members
-
Calendar
Full Version:
rewriting a url
Hostony Board
>
General Support
>
PHP/MySQL
MartinB
Sep 3 2005, 09:54 PM
Well... i'm in blank today.
I want to rewrite the url:
http://www.x.com/index.php?page=trekking
to:
http://www.x.com/trekking.html
some mod_rewrite guru can tell me how is the sentense for rewrite this with apache mod_rewrite ?
thank you
artrocity
Sep 4 2005, 01:19 AM
not a guru but try this...
Options +Indexes
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^trekking.html$ index.php?page=trekking [L]
MartinB
Sep 4 2005, 03:39 PM
thank you!!!!!!!
now i will try to figure how to do it dynamic, because trekking was only an example, but i have lot of pages with the same issue
some like "/index.php?page=X" = "/x.html" (or the inverse)
thanks for your help !!
artrocity
Sep 4 2005, 08:00 PM
This might work for you then...
RewriteRule ^(.*).html$ index.php?page=$1 [L]
MartinB
Sep 4 2005, 11:29 PM
QUOTE(artrocity @ Sep 4 2005, 05:00 PM)
This might work for you then...
RewriteRule ^(.*).html$ index.php?page=$1 [L]
Artrocity, Thank you very much
have a nice day
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here
.
Invision Power Board © 2001-2024
Invision Power Services, Inc.