Another Mod-rewrite question

Discuss practical ways rearrange URLs using mod_rewrite.

Another Mod-rewrite question

Postby RavenMad » Thu Feb 03, 2005 2:38 am

hi guys

wondering if you could help me with this mod rewrite problem??

at the moment i have http://mad.com/index/about/ & http://mad.com/index/calendar/ etc...

but how can i make it:

http://mad.com/about/ & http://mad.com/calendar/

without having the index file in the url

___

Thannks heaps
RavenMad
 

Postby Caterham » Fri Feb 04, 2005 2:20 am

to rewrite it back:
Code: Select all
RewriteEngine On
RewriteRule !^index - [C]
RewriteRule !^(.*) /index/$1 [L]


remember that you have to change all links in your document to http://mad.com/about/. mod_rewrite will only write your files back from http://mad.com/about/ to http://mad.com/index/about/.

Otherwise you won't have an effect on search engines

Bob
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm

Postby RavenMad » Sat Feb 05, 2005 7:39 pm

Works a treat, thanks alot! :biggrin:
RavenMad
 


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 27 guests

cron