Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-07-2009, 10:34 AM   PM User | #1
runeveryday
Regular Coder

 
Join Date: Jul 2009
Posts: 152
Thanks: 8
Thanked 0 Times in 0 Posts
runeveryday can only hope to improve
url redirection and rewrite in .htaccess

who can tell me when to use url redirection or url rewrite in .htaccess.what difference between these. any tips would be appreciated.
runeveryday is offline   Reply With Quote
Old 12-07-2009, 07:31 PM   PM User | #2
Inigoesdr
Super Moderator


 
Inigoesdr's Avatar
 
Join Date: Mar 2007
Location: Florida, USA
Posts: 3,604
Thanks: 2
Thanked 399 Times in 392 Posts
Inigoesdr is a jewel in the roughInigoesdr is a jewel in the roughInigoesdr is a jewel in the rough
Usually you use redirection when you want to send someone off-site, switch from HTTP to HTTPS, or you have moved a page and want to maintain SEO without getting hit for default content. Rewrites are usually used when you want to conditionally match a server variable, such as the URL, and alter the request, or send the traffic to another page without showing the user. This is of course just the general usage -- you can do a lot more with rewrites, and .htaccess directives.
Inigoesdr is offline   Reply With Quote
Old 12-11-2009, 06:53 AM   PM User | #3
myarcadeshack
New to the CF scene

 
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
myarcadeshack is an unknown quantity at this point
what's up bruh... you really know your stuff, I read your help on some tough subjects. anyways I was wondering if you could help me on a simple but very frustrating topic for me. I think you covered it briefly, but it's make seo friendly urls using .htaccess.

If I want to change www.myarcadeshack.com/index.php?action=register to be www.myarcadeshack.com/register

how would I do that...
alot of websites told me to write something with index.php=action, something like that, but I think that's only if you only have one smart urls. My .htaccess file is full of urls that need proper configuration. There are ^Register, ^links ^tradelinks, etc...a bunch. So keep in mind, there is a list of url's with rewrite. I have tried a dozen websites, and I know trying that many should yield results, but I think it might be a permissions issue. I have been able to successfully redirect the non www page to www, using 301 redirect in .htaccess, so since this worked, I'm not sure it is entirely a permission's issue. So help, PLEAAASSSSEEEEE...this is the only issue keeping me from taking my website live on google, and other search enginess. My website is www.myarcadeshack.com if you want to play some games and click on ads. It's only in its infancy but it's growing...errr at least when I get this issue resolved...
Thanks again for your time
myarcadeshack is offline   Reply With Quote
Old 12-14-2009, 01:13 PM   PM User | #4
BunkMedia
New to the CF scene

 
Join Date: Mar 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
BunkMedia is an unknown quantity at this point
Try this:

Code:
RewriteEngine On

## Registration Rewrite Rule
RewriteRule ^([a-z_]+)/ index.php?action=$1
BunkMedia is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:22 AM.


Advertisement
Log in to turn off these ads.