Forum Moderators: phranque
Looking for a little help and come across webmaster world.
Basically I am using the rules below and trying to do the following... :P
I would like
http://www.example.com/testing/login.php
http://www.example.com/thistest/login.php
to be passed as
http://www.example.com/login.php?test_name=testing
http://www.example.com/login.php?test_name=thistest
Rules
RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^([^/¦.]+)/(.*)\?(.*)$ /$2?$3&test_name=$1 [L,NC,QSA]
RewriteRule ^([^/¦.]+)/(.*)$ /$2?test_name=$1 [L,NC,QSA]
RewriteRule ^([^/¦.]+)$ /index.php?test_name=$1 [L,NC,QSA] It works... sort of... :(
My problem is that my stylesheets are in css folder. So when I direct to
http://www.example.com/css/style.css
or
http://www.example.com/testing/css/style.css
it will not let me see the css.
Sorry if it dont make sense... ha ha!
Is it possible to do simliar to above but have the following?
[testing.example.com...]
[thistest.example.com...]
to be passed as
http://www.example.com/login.php?test_name=testing
http://www.example.com/login.php?test_name=thistest
<img src="images/logo.gif"> is page-relative, and will give you the same kind of problem as you report with css.
<img src="/images/logo.gif"> is server-relative, and should work.
<img src="http://www.example.com/images/logo.gif"> is canonical and should work.
Jim