|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
rewrite url
eg for www.students.com
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !^/studentsFolder/ RewriteCond %{HTTP_HOST} ^(www.)?students. RewriteRule ^(.*)$ studentsFolder/$1 RewriteRule ^/(.*)$ studentsFolder/profile.php?user=$1 [L] Hello I have multiple domains from my hosting server. My site is contained within a folder called studentsFolder. The following .htaccess file placed outside of 'studentsFolder' works, so that when you tpye www.students.com you will get the index homepage file from within the studentsFolder. This works fine. However I also want it so that should you type www.students.com/TypeAnythingHere for it to rewrite the url to open the file studentsFolder/profile.php?user=TypeAnythingHere I thought this line would work... RewriteRule ^/(.*)$ studentsFolder/profile.php?user=$1 [L] but it doesn't. Any ideas. Sorry I know this isn't really the right forum for this. |
|
#2
|
|||
|
|||
|
Message Moved
Thread moved from 'PHP Coding' to 'Server Administration' by andrew.
Reason: not php related, Apache/HTTPD related. Moved to Server Administration |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > rewrite url |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|