Jump to content

Problem with 301 Redirects


mediamar
 Share

Recommended Posts

I moved an old site to processwire and want to redirect the old URLs with php-filenames to the new folders via .htaccess to match the new structure.

I tried:

RedirectMatch 301 /filename.php http://example.com/filename/

The Browser end up like this:
http://example.com/filename/?it=filename.php

Its interfering with that Processwire .htaccess rule

# ----------------------------------------------------------------------------------------------- 

  # Pass control to ProcessWire if all the above directives allow us to this point.
  # For regular VirtualHosts (most installs)
  # ----------------------------------------------------------------------------------------------- 
   RewriteRule ^(.*)$ index.php?it=$1 [L,QSA]
 
If i comment that out the redirect in the URL is ok, but every Klick on a websitelink is showing the homepage.
 
Any idea how i can fix this?
Thanks
 
Andreas
Link to comment
Share on other sites

Ok. I tried Jumplinks and it works like charm. Thanks again for the quickest support ever seen and http://modules.processwire.com/authors/mike-rockett/.

Have a nice day.

Hi Mediamar,

I'm sure you've already begun digging into the documentation, but you can use the following redirect to match all URIs using a php extension:

Source: {path}.php

Destination: {path}/

Glad you like the module. :)

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...