Solved

htaccess file not working - need assistance.

Posted on 2007-11-28
3
186 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
[X]
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
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

631 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