Jump to content

Re-route?


le007

Recommended Posts

Thats a good idea, however; my entire website is a 3 column layout with the middle changing through locate. The rest remains static PLUS I've just realised I'll need 33 in total changes!

 

I read an article and came up with this:

 

RewriteEngine On

RewriteRule ^register$ index.php?locate=register

 

Not sure where or what to save the .htaccess file as

Link to comment
Share on other sites

This will work in your root directory, directing everything to index.php, adding the request to the 'local'. e.g. if you called 'www.mywebsite.com/register' it would really call 'www.mywebsite.com/index.php?local=register':

 

RewriteEngine on
Options +FollowSymlinks
RewriteBase /

RewriteRule ^([^/]+)/?$ index.php?local=$1 [QSA,L]		#	files in home dir only

Link to comment
Share on other sites

Hey phat_hip_prog,

thanks for your help buddy. I tried this:

RewriteEngine On

RewriteRule ^register$ index.php?locate=register

 

Saved this as .htaccess in the same directory as index.php and it worked.

 

I don't really get your code:

RewriteEngine on

Options +FollowSymlinks

RewriteBase /

 

RewriteRule ^([^/]+)/?$ index.php?local=$1 [QSA,L] # files in home dir only

 

although I see what you're saying about saving in each directory.

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.