Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 30th, 2012, 03:43 AM
anees_muhd anees_muhd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2008
Location: Cochin, India
Posts: 99 anees_muhd User rank is Lance Corporal (50 - 100 Reputation Level)anees_muhd User rank is Lance Corporal (50 - 100 Reputation Level)anees_muhd User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 11 h 42 m 58 sec
Reputation Power: 5
mod_rewrite - Setting redirection into backward folder

Hi,
I have a domain say http://www.mydomain.com
i have the .htaccess file in the root folder to redirect all the calls into index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php

Now, One of the partner website needs to load the same content of what we have in the http://www.mydomain.com,
and they need to call they URL as
http://www.mydomain.com/partnerwebsite

Of course we have some programing to manage the theme and listing based on the full domain Url.


How can i set that?

I have tried in this way

- I have added the following entry to the httpd-vhosts.conf

<VirtualHost *>
DocumentRoot "H:/xampp/htdocs/mydomainrootfolder"
ServerName mydomain.local/partnerwebsite
<Directory "H:/xampp/htdocs/mydomainrootfolder">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

It is redirected to the correct folder
but the issue there is, since i have
1) the .htaccess entry as i mentioned above
2) the folder or file called 'partnerwebsite' doesn't exists in root folder
it gives an error from the application


I need to be execute the same index.php file from the root folder as such as the root folder is at 'partnerwebsite' folder

Please help

Regards,
Anees

Reply With Quote
  #2  
Old December 1st, 2012, 10:21 AM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Click here for more information.
 
Join Date: Dec 2004
Posts: 7,946 E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)E-Oreo User rank is General 91st Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 10 h 28 m 55 sec
Reputation Power: 7053
Quote:
ServerName mydomain.local/partnerwebsite

This part isn't valid. You can't put paths into a ServerName or ServerAlias. You can't create a vhost for a subdirectory.

If the partnerwebsite directory doesn't exist in your webroot, it seems like the .htaccess rule should be catching the request and routing it through index.php already?
__________________
PHP FAQ
How to program a basic, secure login system using PHP
Connect with me on LinkedIn


Quote:
Originally Posted by Spad
Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > mod_rewrite - Setting redirection into backward folder

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap