Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

htaccess redirect question...

Status
Not open for further replies.

mat

Joined
Apr 18, 2007
Posts
3,838
Reaction score
181
Have worked it out now..... Thank you all for your help!
 
Last edited:
I made a coding mistake and some URLs have been indexed which arnt correct.

sitename.co.uk/whiteproduct/?q=White&page=6&sort=relevance

The "page=6" part is the only bit that changes. But I can add each string individualy to htaccess if easier, as only a few of these pages indexed.

I want the URL to 301 to...

sitename.co.uk/search.php?q=White&page=6&sort=relevance

Please note I cant just tell htaccess to point everything inside whiteproduct folder to go back to index page as there is a content page there...

Thanks

You need something like:

Options +FollowSymlinks
RewriteEngine On
RewriteRule ^whiteproduct/([^/.]+)/?$ /search.php?q=$1 [R,L]

I'll have another look tomorrow if that doesn't work
 
Last edited:
  • Like
Reactions: mat
Thanks, thats the sort of thing I have been trying...

Just tried exactly what you put, but didnt work. :confused:
 
Its something to do with the question mark which is stopping it from working so I see from a quick search in Google!
 
Glad you got it sorted, mod_rewrite can be a PITA lol and I had just looked at too much code yday to figure it out :p
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members online

Premium Members

Latest Comments

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom