Jump to content

[htaccess] Please Please....How to make my URL look Pretty?


natasha_thomas

Recommended Posts

My Friends,

 

I am doing a site, generated on the fly, with PHP Script.

 

Problem is:

 

When you hover over a link, it looks like:

 

http://www.mysite.com/index.php?p1=i phone 3gs at discount prices&p2=BEIOH3827K

 

Obeserve the Spaces in the URL and instead of P1 and P2 it should show: /

 

So i want it to look Like:

http://www.mysite.com/index.php/i-phone-3gs-at-discount-prices/BEIOH3827K

 

Funny thing is:

 

In my Htaccess a line is auto generated, i do not even know what it means:

 

RewriteRule ^files/([^/]+)/([^/]+).htm$ /index.php?p1=%%Title%%&p2=%%ASIN%% [NC,L]

 

Please someone, help me to achieve the Link Structure i am looking for.....

 

Thanks in Advance

Natasha T.

 

 

 

 

Link to comment
Share on other sites

The line in your .htaccess file will take any URL that looks like http://domain.com/files/something/something.htm and actually show the page which is represented by the other URL. I'll be honest though I have no idea what %%Title%% or %%ASIN%%. In order to make your links into the format you mention, you need to change the logic that outputs the link to output the new format, you then need to add another line to your .htaccess file that redirects that style of link to the link style you currently have. As mentioned by Mchl, search for mod_rewrite and you'll find hundreds of tutorials and resources. If you need any more specific help then you'll have to let us know.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.