Solved

htaccess file not working - need assistance.

Posted on 2007-11-28
3
181 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
ID: 20370384
Try this:


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

Open in new window

0
 

Author Comment

by:dprundle
ID: 20371600
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
ID: 20371621
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

867 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

21 Experts available now in Live!

Get 1:1 Help Now