Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

htaccess file not working - need assistance.

Posted on 2007-11-28
3
183 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

809 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