Jump to content

How To Do A Redirect With No Extension


webgyrl

Recommended Posts

Ok, here's the scenario:

 

I want to create a redirect link and make it simple so people can remember it.

Something like http://www.natalie-brown.com/challenge

 

I want to redirect this link to another site.

 

How can I do this in my .htaccesss file?

 

Normally for a redirect I would put something like:

redirect 301 /list.htm http://www.natalie-brown.com/interact/mailing-list.html

 

But I usually have to have the .htm or .html

 

I want to make it so that I don't have to have that as a part of the link that is being redirected.

 

Is this possible and how can I do it?

 

Thanks!

Nat

Link to comment
Share on other sites

Sounds like you want a rewrite as opposed to a redirect.

 

try something like this:

 

>
RewriteEngine on
RewriteRule ^challenge your-actual-page.html [QSA,L]

 

 

This will rewrite challenge to your-actual-page.html but 'challenge' will remain in the address bar.

Link to comment
Share on other sites

Sounds like you want a rewrite as opposed to a redirect.

 

try something like this:

 

>
RewriteEngine on
RewriteRule ^challenge your-actual-page.html [QSA,L]

 

 

This will rewrite challenge to your-actual-page.html but 'challenge' will remain in the address bar.

 

AWESOME! Works like a charm. Thank ye kind sir!

 

@BOXTURT... it's been a while! How ya doin?

Edited by webgyrl
Link to comment
Share on other sites

Sounds like you want a rewrite as opposed to a redirect.

 

try something like this:

 

>
RewriteEngine on
RewriteRule ^challenge your-actual-page.html [QSA,L]

 

 

This will rewrite challenge to your-actual-page.html but 'challenge' will remain in the address bar.

 

Uh-oh, not sure what happened, but when I ported my new site to root, this redirect stopped working.

 

The rule I have in htaccess is:

## Begin Rewrite Section

RewriteEngine on

RewriteRule ^challenge http://nataliebrown.ning.com/page/90-day-challenge [QSA,L]

## End Rewrite Section

 

I can send htaccess if you PM me your email addy. Some of the file is new as I switched from J1 to J1.5

 

Thanks for any help you can give!

Nat

Edited by webgyrl
Link to comment
Share on other sites

Ok for now I found a way around it by creating a challenge folder with an index.html that has a meta refresh. Hope I can find out why the redirect stopped working!

Edited by webgyrl
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...