Visit The New, Modern Unix Linux Community

.htaccess Rewrite Rule

Thread Tools Search this Thread
Top Forums Web Development .htaccess Rewrite Rule
# 1  
.htaccess Rewrite Rule

Hello All,

I have been asked to create a .htaccess redirect. I have never attempted to work with one of these files. We have a pretty vanilla LAMP setup using rhel4 apache1.3 and php4.2.3.

I was instructed to place the .htaccess file in the document root of the site and and to attempt to get to work.

My goal is to have:

Redirect to:


Here is what I have so far. And I just keep getting a 404. It has to be .htaccess file to. I can make the redirect in the vhost but that is not acceptable.

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^/?traffic$ /topic/traffic.php

Thanks in advance.

# 2  
RewriteRule ^blah[/]blah$ blah[/]blah2 [R=301,L]

Try something like that, although the brackets may need to be revampled

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #786
Difficulty: Medium
In 2019, Bill Gates had a net worth estimated to be over $200 billion USD.
True or False?

7 More Discussions You Might Find Interesting

1. Web Development

ReWrite rule giving a hard time.

Hi all, I am trying to find a rewrite rule that can help me with the following situation. So I am currently on a page which has a URL:!/shop/phones/max-plus/features/ Now when I hover over a certain link, I can see that it will goto: <a... (0 Replies)
Discussion started by: Junaid Subhani
0 Replies

2. Web Development

Rewrite Rule looping error

Hi, I have a domain "" and i wanted to redirect only request like " /index.html" to "". Please note that a extra string "?NEW=1" added at the end of the URL. So Request for REDIRECTS TO... (12 Replies)
Discussion started by: Paulwintech
12 Replies

3. UNIX for Advanced & Expert Users

[SOLVED] htaccess rewrite rule help!

hi there, I need that when user input it shows because of facebook likes, and I found out that this is set up as rewrite rule in .htaccess file? how to achieve it? thank you... :confused: ---------- Post updated at 04:47... (0 Replies)
Discussion started by: vogueestylee
0 Replies

4. UNIX for Advanced & Expert Users

Apache rewrite rule help needed

Hi All, I want to redirect from http://localhost/abc/xyz/def?cc=dk&lc=da to http://localhost/abc/mnc/pdf?cc=dk&lc=da. Please suggest a rewrite rule. (0 Replies)
Discussion started by: jagnikam
0 Replies

5. Web Development

Need help with rewrite rule

Hi, I hosted my site on Apache web server. I wanted to redirect all the users request to a HTML page(maintenance page). I used the below rewrite rule to do ths same. RewriteEngine on RewriteRule .* /maintenance.html The maintenance.html page contains an image. When ever I try to... (2 Replies)
Discussion started by: BSrikanthB
2 Replies

6. UNIX for Dummies Questions & Answers


i want to protect a folder on my HP.... does the folder need more than ".htaccess" and ".htpasswd" to be protected , and ask for login and password??? Please help ...... i use HTAdmin 1.2.1 to manage my access files.. The systemadmin cant or wount answer.....:confused: Avenger (3 Replies)
Discussion started by: Avenger
3 Replies

7. UNIX for Dummies Questions & Answers


For a schoolproject, I have to set up an intranet at a company headquarters in the Netherlands. But they want to give the division in the United States access to that intranet. I have to find out how to do that. I've heard that you can do that by giving certain people access to the intranet with... (1 Reply)
Discussion started by: Puc conDoin
1 Replies

Featured Tech Videos