gordong1968 Posted November 11, 2008 Share Posted November 11, 2008 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 More sharing options...
JasonLewis Posted November 11, 2008 Share Posted November 11, 2008 Try making this part: html_web_store.cgi(.*)page=l_fashon.htm This: html_web_store.cgi\?page=l_fashon.htm Link to comment https://forums.phpfreaks.com/topic/132329-confused-redirect-with-a-in-the-url/#findComment-688104 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.