Jump to content

2 variable redirection issue


siwelis

Recommended Posts

Hello!

 

I've been working on this .htaccess file for two days, unfortunately.

 

Options +Indexes

Options +FollowSymlinks

RewriteEngine On

RewriteBase /

RewriteRule ^a/(.*)/?req=read&article_title=(.*)$ /a/$1/$2.html [R]

RewriteRule ^cgi-bin/$ http://example.com/ [R]

RewriteRule ^cgi-sys/scgiwrap/$ http://example.com/ [R]

RewriteRule ^a/(.*)/(.*)\.html$ /a/$1/?req=go&name=$2

ErrorDocument 404 http://example.com/notfound.php

 

I've got it all figured out except the redirecting in red. It's been a major pain in the butt. Nothing happens at all with that red code in there!

 

I have one piece of code (in blue) to rewrite the url, and another (red) to redirect the old version to the new version.

 

Do you have any idea what I'm doing wrong? Thank you so much!

Link to comment
https://forums.phpfreaks.com/topic/145345-2-variable-redirection-issue/
Share on other sites

I'm sorry, I'm trying to redirect all urls like this

 

example.com/a/Arts/?req=read&article_title=MonaLisa to example.com/a/Arts/MonaLisa.html

 

but i need it to be it to redirect other categories too...

example.com/a/News/?req=read&article_title=OsamaVSObamaBoxingMatch to example.com/a/News/OsamaVSObamaBoxingMatch.html

 

Thank you for your response!

I tried it and you were right that it didn't change anything.

 

Funny... I just realized a new appreciation for error messages. lol. I'll keep researching and if I find anything I'll post the answer I find here. If you think of anything please let me know. Thank you for looking into this already.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.