Jump to content

Recommended Posts

I am very new to all of this and was looking for some help. I was using cPanel to redirect a URL from a very old shopping cart site to a new website, but it wouldn't give me what I needed. I started looking into .htaccess and mod_rewrite tutorials and am part of the way there, but am still having problems.

 

I have several inbound links to my site that looks like this:

http://leathercatalog.net/cgi-bin/html_web_store.cgi?page=l_fashon.htm

or possibly with extra "junk" after the .htm like this:

http://leathercatalog.net/cgi-bin/html_web_store.cgi?page=l_fashon.htm&cart_id=7044445.5523&store=%%cart_id%%#top

 

Having no idea what I am doing, I wrote the following code and it ALMOST works.

RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^cgi-bin/html_web_store.cgi(.*)page=l_fashon.htm(.*)$ "http\:\/\/www\.jaminleather\.net\/products_leather_blazers\.asp\?dept\=15" [R=301,L]

 

The only thing messing me up is the question mark in the inbound link. If I go to a browser and change the question mark to anything else, for example an underscore or a plus sign, the link will be redirected. For example, the following will redirect just fine.

http://leathercatalog.net/cgi-bin/html_web_store.cgi+page=l_fashon.htm

It will not WORK with the question mark and unfortunately that is how is appears in search engine land.

 

Can anyone tell me what I am missing here? Thanks so much for the help!

George

Link to comment
https://forums.phpfreaks.com/topic/132329-confused-redirect-with-a-in-the-url/
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.