Solved: htaccess links rewriting

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

stardust7178

Thread Starter
Joined
Mar 22, 2008
Messages
25
I'm in the process of converting a site with frames to PHP. I use the following rewriting rules to shorten the links:

Code:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([^/]*)\.html$ index.php?cat=1&id=$1 [R,L]
RewriteRule ^login$ othernews/login.php [R,L]
RewriteRule ^([^/]*)/([^/]*)\.html$ index.php?cat=$1&id=$2 [R,L]
It works correctly on my pc. I tried to test the file on the server and it displayed some errors. I didn't have time to look into it so I removed the file, but after I did that all the link showed up broken and the site didn't show up anymore.

I need help to understand what's going on and fix it. The owner of the site is not happy. Thanks.
 
Joined
Aug 12, 2007
Messages
696
stardust,

So the only thing you did is put the .htaccess file in place on the server, see that it didn't work, then remove it. After that all links are broken. Is that correct?

Doesn't sound right. We definitely need more details about the errors you saw (check the server logs), and also whether you did *anything* else.
 

stardust7178

Thread Starter
Joined
Mar 22, 2008
Messages
25
Thank you DrP and ehymel for offering to help. I figured out that what I had to do was upload an empty file in order to have the rules erased from the memory. I corrected the rules and now it works.
 
Joined
Dec 9, 2010
Messages
22
It might be the problem in your hosting server, it means the hosting provider doesn't allow to create an htaccess fiile. I've already seen this kind of problem and solution.. If you want still to create a friendly seo url, first is to navigate their php server by printing phpinfo(); on your php file. Read all of them and find the text about htaccess if enabled or disabled.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top