LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-25-2010, 04:46 AM   #1
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Rep: Reputation: 34
mod_rewrite htaccess not working


Hi all,

I want to use rewite module to change my site url from site/index.php to site/cat/ for example

I have created .htaccess file in the directory where the file is and add to it:
Code:
RewriteEngine on
Rwerite ^cat$ /site/index.php
Here site is not my site, it just in example.
I have rewrite.load in the loading list of modules and I can see it loads in phpinfo(). AllowOverride is set to All for the current site, but no redirect is made on

site/cat

What i am missing?
 
Old 11-25-2010, 05:06 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Not "Rwerite" but "RewriteRule" and if file is in directory "site" there is no need of full path.
Code:
RewriteEngine on
RewriteRule ^cat$ index.php

Last edited by eSelix; 11-25-2010 at 05:08 AM.
 
1 members found this post helpful.
Old 11-25-2010, 05:16 AM   #3
konzo
Member
 
Registered: Dec 2008
Location: Bulgaria
Distribution: Debian / Slackware / Ubuntu
Posts: 230

Original Poster
Rep: Reputation: 34
"Rwerite" was misstyped, i didn't copied it. But the full path was the broblem. Thanks for the tip. I knew that i am close
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Subdomain Redirection Using htaccess And mod_rewrite On Apache For Linux Or Uni LXer Syndicated Linux News 0 02-27-2009 10:00 AM
.htaccess - how do I strip characters from a dynamic url? using Mod_rewrite kilaz Linux - Server 3 10-15-2008 01:28 PM
Help with mod_rewrite - [L] not working MicahCarrick Programming 0 05-08-2008 09:12 PM
.htaccess mod_rewrite issue Jukas Linux - Software 2 12-13-2005 01:23 PM
Suse 9.1 Pro & htaccess file: mod_rewrite not loading sorenson2743 SUSE / openSUSE 2 12-04-2004 12:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration