Huge Problem With Simple Rewrite!!!

Discuss practical ways rearrange URLs using mod_rewrite.

Huge Problem With Simple Rewrite!!!

Postby ripjake » Thu Oct 09, 2008 5:19 pm

:-?

I could really use someone's help! I'm trying to do a simple page redirect from www.blah.com/sign-up to www.blah.com/signup.php

The redirect works, the only thing is that it adds a "/" mark at the end of the redirected URL making the destination www.blah.com/signup.php/

The slash at the end leads to a page error! I cannot understand how in the heck to get the rewrite code to stop adding the slash. Below is the htaccess file. Anyone's help is greatly appreciated!

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

RedirectPermanent /sign-up http://www.blah.com/signup.php
ripjake
 
Posts: 1
Joined: Thu Oct 09, 2008 5:09 pm

Postby richardk » Fri Oct 10, 2008 12:36 pm

Try
Code: Select all
Options +FollowSymLinks

RedirectMatch 301 ^/sign-up/?$ http://www.blah.com/signup.php

# BEGIN WordPress
<IfModule mod_rewrite.c>
  RewriteEngine On

  RewriteCond %{SCRIPT_FILENAME} !-f
  RewriteCond %{SCRIPT_FILENAME} !-d
  RewriteRule . /index.php [L]
</IfModule>
# END WordPress
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 12 guests

cron