Jump to content

Basic Rewrite -- Issues...


shanejeffery86

Recommended Posts

I have been doing mod_rewrite for a bit now and heck if I can figure out what is going wrong. 

 

I am just trying to rewrite 3 VERY basic URLs.

 

http://www.khaccounts.net/index.php -- to -- http://www.khaccounts.net/buy-wow-account/

http://www.khaccounts.net/sell.php -- to -- http://www.khaccounts.net/sell-wow-account/

http://www.khaccounts.net/about.php -- to -- http://www.khaccounts.net/about-khaccountsnet/

 

I was under the impression that the following would work:

 

RewriteEngine On

RewriteRule /buy-wow-account/ /index.php [L]

RewriteRule /sell-wow-account/ /sell.php [L]

RewriteRule /about-khaccountsnet/ /about.php [L]

 

What am I doing wrong?  The mod_rewrite module is enabled at the server level.

 

Thanks!

Link to comment
Share on other sites

Where are you placing the directives? Assuming it's in a .htaccess file then you probably want to lose the forward slash at the start of the pattern.

 

RewriteEngine On
RewriteRule ^buy-wow-account/?$ /index.php [L]
RewriteRule ^sell-wow-account/?$ /sell.php [L]
RewriteRule ^about-khaccountsnet/?$ /about.php [L]

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.