close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

.htaccess Redirect

Thread began 4/22/2010 4:00 pm by bjgarner241692 | Last modified 4/23/2010 7:00 am by CraigR | 2175 views | 5 replies |

bjgarner241692

.htaccess Redirect

I have a puzzler ....

I have replaced a website that was formerly done with some sort of CMS package. There were about a thousand ways for the old site to generate links to product pages and some of them just do not make sense.

I have created an .htaccess file to handle redirects and it works fine for 95% of the old URL's but there are some like this:

c5/

that have me stumped.

I have a page on the site called products.php so what happens is it loads the products page content but because all of the links to images, css etc. are relative, it messes the page up substantially because it is looking for the links in the /C5/ directory.

The next one might be C85 or it might be on another page like index.php

I need to know how I can either strip that appended directory name or alternatively use a wild card or something so that if the page products.php is specified in the URL at all it simply redirects to the base page.

I know this has nothing to do with WA but if someone can help I would be quite grateful.

Sign in to reply to this post

CraigRBeta Tester

are you sure the site didn't already have an htaccess file which may have had some url rewriting ?

Sign in to reply to this post

bjgarner241692

could it exist somewhere other than the root?

Sign in to reply to this post

CraigRBeta Tester

not in my experience.

the reason I asked, was the url you posted looked like a it was a rewritten (friendly) url for example using mod_rewrite.

Sign in to reply to this post

bjgarner241692

Yes, that is the problem. there was formerly some rewriting going on so these URL's don't exist on the site, they only exist on search engines and because it generates a result (although a bad one) the links remain in the search index.

Very frustrating.

Sign in to reply to this post

CraigRBeta Tester

i can't really suggest where to look for the rewriting file.

sorry I couldn't help, hopefully one of the WA guys can help.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...