Forum Moderators: phranque

Message Too Old, No Replies

help appreciated if don't mind taking a look. thx.

display in address bar relative to entire site?

         

safer_nick

8:01 pm on May 22, 2005 (gmt 0)

10+ Year Member



trying this again because due to unfortunate circumstances, my first nick was inappropriate. heh.

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.

jdMorgan

8:17 pm on May 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In message number 6 of this thread [webmasterworld.com], I described the process of creating and then rewriting search-friendly URLs. So maybe starting with that will help you to understand the process and narrow down your questions.

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

safer_nick

1:58 am on May 25, 2005 (gmt 0)

10+ Year Member



hmmm.

okay. this seems different than i thought. i will look into sending friendly urls and converting them ultimately back into normal ones. thanks a bunch.


learning... :)