IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> rewriting a url, help? :)
MartinB
post Sep 3 2005, 09:54 PM
Post #1


Super Member


Group: Members
Posts: 1804
Joined: 10-March 04
From: Cordoba, Argentina
Member No.: 554



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 huh.gif


--------------------
Go to the top of the page
 
+Quote Post
artrocity
post Sep 4 2005, 01:19 AM
Post #2


Not So Junior Member


Group: Members
Posts: 249
Joined: 1-June 03
Member No.: 185



not a guru but try this...

Options +Indexes
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^trekking.html$ index.php?page=trekking [L]
Go to the top of the page
 
+Quote Post
MartinB
post Sep 4 2005, 03:39 PM
Post #3


Super Member


Group: Members
Posts: 1804
Joined: 10-March 04
From: Cordoba, Argentina
Member No.: 554



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 !!


--------------------
Go to the top of the page
 
+Quote Post
artrocity
post Sep 4 2005, 08:00 PM
Post #4


Not So Junior Member


Group: Members
Posts: 249
Joined: 1-June 03
Member No.: 185



This might work for you then...

RewriteRule ^(.*).html$ index.php?page=$1 [L]
Go to the top of the page
 
+Quote Post
MartinB
post Sep 4 2005, 11:29 PM
Post #5


Super Member


Group: Members
Posts: 1804
Joined: 10-March 04
From: Cordoba, Argentina
Member No.: 554



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 smile.gif
have a nice day


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 18th July 2018 - 12:40 PM