Home Mod Rewrite in htaccess is preventing the 301 Redirect from working properly
Reply: 0

Mod Rewrite in htaccess is preventing the 301 Redirect from working properly

user642
1#
user642 Published in April 21, 2018, 3:52 am

301 Redirects are not working properly because the ruleset in the mod rewrite is somehow getting added to the end of the 301 Redirect. For example, if my 301 Redirect looks like this:

Redirect 301 /directory/oldpage.html /directory/newpage.html

the redirect will go to:

/directory/newpage.html?section=directory&page=oldpage

Here is the mod rewrite in htaccess:

RewriteRule ^directory/(.*).html$  /directory/controller.php?section=directory&page=$1 [L]

page and section variables are defined through the included page’s file name.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.299828 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO