Here is the problem...
I am trying to redirect a url like this [BMW is just an example, might be VW or also Lamborghini]
- Code: Select all
www.domain.com/BMW/somename.html
to this
- Code: Select all
www.domain.com/phpfile.php?variable=somename&variable2=BMW
There might be an occurrence however where there is no /BMW/ just
- Code: Select all
www.domain.com/somename.html
and they should then be redirected to
- Code: Select all
www.domain.com/phpfile.php?variable=somename
Now i have gotten the first to somehow work by just using a RewriteRule as following:
- Code: Select all
RewriteRule ^/?(BMW|VW)/([^/]+)\.html$ http://www.domain.com/phpfile.php3?variable=$2&variable2=$1 [R=301,L]
however, all my images don't show up because they are now being looked after in the domain.com/BMW/image/ folder not the domain.com/image/ folder. Furthermore the url is actualy displayed as
- Code: Select all
http://www.domain.com/audi_details.php3?car_name=$2&layout=$1
not as
- Code: Select all
http://www.domain.com/BMW/somefile.html
Seems confusing? Tell me about it.
I truly hope someone can help me out with this, i kind of need it asap.
Thank you in advance.