Forum Moderators: phranque
intro: hello all! happy! hope everyone is well. sorry to ask such a dumb question, but i have pored over tons of posts and web resources and i am pretty motivated to learn this, i just dont think i have a handle on rewrite cond strings and rewrite rules quite yet. sad
problem: i'd ideally like to have [example.com...]
continue working its dynamic content magic behind the scenes, while the browser displays only something nice like [example.com...] to the user.
the trick is it needs to work for any address on that domain, ie: [example.com...] needs to display [example.com...]
code so far: i've tried...
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.*)
RewriteRule ^/test/(.*)+$ /test/1/2/3/4/%1 [R=301,L]
i've also tried
RewriteEngine On
RewriteRule ^/test/1/2/3/4/(.*)+$ /test/$1 [R=301,L]
and +'s, /'s,?'s and tons and tons and tons of stuff. i dunno. those are the last one's i was kicking around for...uh...desperation. or something. i've spent hours. heeeellllpp...please.
outro: i am 100% aware there are a million, *million* search engine friendly url threads here. i read them, and feel stupid. sad apologies. thanks so much for reading, and any help is appreciated. stay cool all.
You will discover that mod_rewrite is only one half of the process, and that it is used to rewrite friendly URLs back to unfriendly ones after the friendly URLs are requested from your server and before any content is served; It is a front-end process, and cannot change the links that are displayed on your pages.
For additional background, see the documentation cited in our forum charter [webmasterworld.com].
Jim