Forum Moderators: phranque

Message Too Old, No Replies

need help with htaccess rewrite rule

         

vn412

1:18 pm on Dec 29, 2011 (gmt 0)

10+ Year Member



Hi,

I want to rewrite the following url:
[mydomain.com...]

to

[mydomain.com...]

so that url that is visible to users will the second one but
it loads the page of the first url i specified.

Please help me.
Thanks in advance

g1smd

1:38 pm on Dec 29, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What code have you tried already?

There's approx 3000 previous threads asking the same or very similar question to guide you.

Use example.com in this forum to suppress the auto-linking function.

vn412

7:26 am on Dec 30, 2011 (gmt 0)

10+ Year Member



Please help me with the syntax, I m newbie.
As i told I have to rewrite url
example.com/classifieds/index.php?newjersy

to
example.com/newjersy/classifieds.
I m stuck with htaccess.

Thanks

lucy24

4:50 pm on Dec 30, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Forums search for the words "rewrite" and "redirect", because you will be doing both.

First redirect to the pretty URL without extension or query, and then rewrite back to the "real" location which contains your information. Oh, and RewriteCond will be in your search too, because you need to constrain the redirect to requests coming in from outside.

Note too that htaccess is very, very unforgiving. A simple misspelling or punctuation typo can easily lead to a 500 error taking your site off the air until further notice.

But start by reading the last few weeks of posts in this forum. 3000 may be an exaggeration, but yours is definitely in the Top Five questions lately.