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
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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.