Solved

htaccess file not working - need assistance.

Posted on 2007-11-28
3
180 Views
Last Modified: 2013-11-19
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^airport/(.+)$ index.php?state=$1 [nc]

I'm trying to make http://www.synapticsurge.com/airport/RI/ go to http://www.synapticsurge.com/airport/index.php?state=RI

It's not working.. and I've been busting at it all day.
0
Comment
Question by:dprundle
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
Wod earned 500 total points
Comment Utility
Try this:


RewriteRule ^/airport/(.*)$ http://www.synapticsurge.com/index.php?state=$1 [NC]

Open in new window

0
 

Author Comment

by:dprundle
Comment Utility
Ok I tried that but it's still not working.

Options +FollowSymlinks
RewriteEngine On
RewriteRule ^(..)\/$ index.php?state=$1 [nc]
RewriteRule ^(..)\/(.+)\/$ index.php?state=$1&city=$2 [nc]
RewriteRule ^(..)\/(.+)\/(.+)\/$ index.php?state=$1&city=$2&airport=$3 [nc]


For Example,
If it is http://mysite.com/ST/City Name/Name of Airport/ it breaks everything because of the spaces.  It also appears that the .+ grabs the next / in the URL.
0
 

Author Comment

by:dprundle
Comment Utility
I figured it out thanks to your help.

Instead of (.+) I used the opposite (^/) and it worked.. points go to you m8
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This video teaches users how to migrate an existing Wordpress website to a new domain.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now