Current location: Hot Scripts Forums » Other Discussions » Web Servers » Mod Rewrite Help


Mod Rewrite Help

Reply
  #1 (permalink)  
Old 11-02-09, 04:06 PM
whaffenden whaffenden is offline
Newbie Coder
 
Join Date: Nov 2009
Location: England
Posts: 14
Thanks: 1
Thanked 1 Time in 1 Post
Mod Rewrite Help

Hi Everyone,

I'm running a website and am using simple URL rewriting to achieve search engine optimised URLs. I need to split a section of the website into a subdomain. For example i wish to split example.com/example into example.example.com. I want to keep the code the same and just change the URL if possible. I've tried the following but just get a server error.

Code:
RewriteCond %{HTTP_HOST} ^example
RewriteRule (.*) index.php/example [NC,L]
Does anyone have any suggestions?

Thanks,
Wayne
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-04-09, 01:11 AM
BurkeFour BurkeFour is offline
Newbie Coder
 
Join Date: Oct 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Do you have the ability to edit DNS records for "example.com"? You would need to create a DNS record for the subdomain in order to route visitors to the correct IP address when their computer attempts to resolve the address.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 11-04-09, 11:34 AM
whaffenden whaffenden is offline
Newbie Coder
 
Join Date: Nov 2009
Location: England
Posts: 14
Thanks: 1
Thanked 1 Time in 1 Post
I already have the subdomain created, which points to the main website. I've discovered since that i need to change the request URI to achieve what i need to. What i need to do is say that whatever the subdomain is it changes the request URI of the main site to the name of the subdomain. An example would be subdomain.example.com -> example.com/subdomain. Thanks again.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mod Rewrite problem sod_atticus PHP 1 07-19-06 03:13 PM
mod rewrite problem gnznroses Perl 4 11-03-05 12:24 AM
Mod rewrite help with perl script Gastongr Perl 1 10-11-05 09:55 AM
Some mod rewrite help jasong PHP 4 01-02-05 02:04 AM
classified ads with mod rewrite hopalong Script Requests 0 07-24-04 10:58 PM


All times are GMT -5. The time now is 05:35 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.