This is a discussion on ".htaccess redirect problem" within the PHP Forum section. This forum, and the thread ".htaccess redirect problem are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
.htaccess redirect problem
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
.htaccess redirect problem
Sorry, not sure if this is an appropriate forum for my enquiry. But just haven't found siutable category. Here is the problem:
I redirect a big number of files with 301 redirect in .htaccess file. The redirect line for each file looks like this:
|
|
|
|
#2
|
||||
|
||||
|
Re: .htaccess redirect problem
I'm no expert on this, but do any of these help?
http://www.google.com/search?q=.htac...ing%20redirect |
|
#3
|
|||
|
|||
|
Re: .htaccess redirect problem
Quote:
redirect 301 /old/ http://www.mysite.com/new.php redirect 301 /old/old.php?id=1 http://www.mysite.com/new.php?id=1 redirect 301 /old/old.php?id=2 http://www.mysite.com/new.php?id=2 redirect 301 /old/old.php?id=3 http://www.mysite.com/new.php?id=3 and it worked correctly for the base url only (1st redirect) Now I have simply removed anything after the first line - and it workes fine for all the dynamic urls based on www.mysite.com/new.php It really troubled me I should admit. Quite a bit of work has been done to achieve our current positions in SERPs and I didn't want to roll back to the old design/structure either. The other possible question out of this is how to make a rewrite rules with mod_rewrite for the new urls having redirects from the old (non-exsisting) ones. Or in other words: Task #1 to redirect http requests from the old urls to new ones (accomplished) Task #2 to make new urls SE friendly (give them a static look) Would it be ok just to add rewrite rules after 301 redirect rules into the same .htaccess file? |
|
#4
|
||||
|
||||
|
Re: .htaccess redirect problem
I'm going to bow out on this one, I only use static pages. Sorry!
|
![]() |
| Tags |
| 301 redirect, htaccess |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 301 redirect and .htaccess Help | dts0099 | Search Engine Optimization (SEO) | 2 | Oct 26th, 2007 21:48 |
| .htaccess rewrite problem | benbigun | PHP Forum | 4 | Nov 13th, 2005 01:08 |