Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-17-2007, 04:20 PM   PM User | #1
boeing747fp
Regular Coder

 
Join Date: Oct 2003
Posts: 599
Thanks: 1
Thanked 1 Time in 1 Post
boeing747fp is an unknown quantity at this point
mod_rewrite

ok so i moved my site from windows server to linux, but some remote sites link to /directoryname/subdirectory/file.html and some link to /DirectoryName/subdirectory/file.html and i need to have a mod_rewrite condition that will redirect all /directoryname/..... to /DirectoryName/.... and some links have multiple subdirectories and some dont. i cant seem to get it to work.

Code:
RewriteEngine on
RewriteRule ^directoryname$ DirectoryName$
boeing747fp is offline   Reply With Quote
Old 02-17-2007, 06:44 PM   PM User | #2
johnnyb
Regular Coder

 
Join Date: Apr 2003
Location: Montreal, QC
Posts: 340
Thanks: 3
Thanked 2 Times in 2 Posts
johnnyb is an unknown quantity at this point
I'm not an expert but try this:

Code:
RewriteRule ^directoryname(/.*)?$ DirectoryName$1$
You were losing the stuff that came after the directoryname, this should keep it for you.
__________________
Search for Laughter or Just Search?
GiggleSearch.org
Blog: www.johnbeales.com
All About Ballet: www.the-ballet.com
johnnyb is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:50 PM.


Advertisement
Log in to turn off these ads.