homepage Welcome to WebmasterWorld Guest from 54.227.12.219
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Mod Rewrite/Apache
Can't rewrite my URLS
warrenk




msg:1507196
 3:34 pm on Oct 28, 2003 (gmt 0)

I am having problems getting the friendly urls working. I checked with my host and he told me that it was installed. Plus he confirmed the correct code was entered in httpd.conf. Not sure if there are problems with the setup...or my syntax...but nothing is happening with my urls.

Here is my url...

[website.com...]

I want it to be...

[website.com...]

Here is what I placed in .htaccess...

RewriteEngine On
RewriteRule ^brandproducts/(.*).php /brandproducts.php?brandid=$1

Am I missing something?

Thanks for any help!
Warren

 

claus




msg:1507197
 4:07 pm on Oct 28, 2003 (gmt 0)

I believe you are missing an initial slash in your rewrite rule. Try this, it might do the trick:

RewriteRule ^/brandproducts/(.*).php /brandproducts.php?brandid=$1

/claus

jdMorgan




msg:1507198
 4:33 pm on Oct 28, 2003 (gmt 0)

warrenk,

Try adding the Options directive as shown, and note the minor tweaks to the RewriteRule itself.

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^brandproducts/(.*)\.php /brandproducts.php?brandid=$1 [L]

If you have access to your raw error log file, take a look at it - the error log will often give a good clue as to what is wrong.

Jim

warrenk




msg:1507199
 5:07 pm on Oct 28, 2003 (gmt 0)

Jim,

I made the changes you suggested and still no luck. There is nothing in my error logs. Is there anyway to tell if my host has the rewrite rule installed correctly?

Warren

jdMorgan




msg:1507200
 5:16 pm on Oct 28, 2003 (gmt 0)

warrenk,

Ask them to send you a copy and to tell you where they installed it -- for example, is it installed in httpd.conf or in .htaccess in your web root directory?

claus' suggestion about the leading slash should be heeded if the code is installed in httpd.conf, and it is (normally) omitted if the code is installed in .htaccess.

Jim

domingo




msg:1507201
 6:53 pm on Oct 29, 2003 (gmt 0)

Take a look at this thread

[webmasterworld.com...]

I have the same problem and now its resolve.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved