Forum Moderators: phranque
Here is my current code:
# ****************
# Enable mod_rewrite, start rewrite engine
Options +FollowSymLinks
RewriteEngine on
#
# Internally rewrite search engine friendly static URL to dynamic filepath and query
RewriteRule ^car/([^/]+)/([^/]+)/?$ /detail.php?user=$1&id=$2 [L]
#
# Externally redirect client requests for old dynamic URLs to equivalent new static URLs
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /detail\.php\?user=([^&]+)&id=([^&]+)\ HTTP/
RewriteRule ^detail\.php$ [website.com...] [R=301,L]
# ****************
My problem is in this line:
RewriteRule ^car/([^/]+)/([^/]+)/?$ /detail.php?user=$1&id=$2 [L]
I was unable to discover how to remove the "car" subdir. Can anyone please help, thanks so much in advance,
regards and best wishes.
I'd suggest reading the following threads from the Apache forum section of the WebmasterWorld library [webmasterworld.com]:
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
Jim