Solved

Want to change bar.htm/?source=whatever to bar.htm (without trailing slash or query string)

Posted on 2003-11-26
3
206 Views
Last Modified: 2010-03-04
I've spent two hours trying to mess with mod rewrite stuff to no avail.

I think the title pretty much says it all, but to reiterate...

I stupidly set up some URLs (on partner sites, search engines, etc.) a while back that look like this:

http://smilezone.com/foo/bar.htm/?source=overture  and
http://www.smilezone.com/foo/bar.htm/?source=findwhat

I'd now like to have these queries redirected to, for the examples above, to
http://smilezone.com/foo/bar.htm

(with no trailing slash or query string)

Thanks in advance for your quick help on this, and happy early Thanksgiving!

Regards,
Adam

P.S. -- Please note that I'll be gone a couple of days for Thanksgiving; I'll return by Friday and will view comments at that time.  Thanks for your help and your patience :)
0
Comment
Question by:ThatAdamGuy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 33

Accepted Solution

by:
shalomc earned 500 total points
ID: 9934082
Adam,
try this:

RewriteEngine  on
RewriteRule    ^foo/bar.htm(.*)$  http://smilezone.com/foo/bar.htm

BTW, an HTML file is tolerant of any additional data appended to it after a question mark (in a QUERY_STRING).
Apache will simply serve the bar.htm file, so you may not need the rewrite rule after all.





0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question