Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache
- Date: Sat, 19 Aug 2006 02:17:58 +0900
- From: Dave M G <martin@example.com>
- Subject: Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache
- References: <44E53F8A.90605@example.com> <20060818.145626.239386559.dave@???> <44E57D79.9010808@example.com> <931e6e80608180747g40ca3d5aj1da3a3865fa22cb7@example.com> <44E5DA8A.3080105@example.com> <931e6e80608180909j70c5b1fbg95a27f2f55188259@example.com>
- User-agent: Thunderbird 1.5.0.5 (X11/20060728)
Godwin, Romans, Thank you for your help and advice.I think I must be missing some small detail here, as it is still not working. I checked my syntax against the Apache.org web site, and made some small adjustments, but still without success.If it's not too much trouble, could someone review these steps and tell me where I might have gone wrong?I have this in my /etc/apache2/httpd.conf file: <Directory /var/www> AllowOverride All </Directory>I believe that /var/www is my document root. And according to this web page, the AllowOverride should specify "All".http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride My index file is here: /var/www/web_sites/testsite.com/web/index.php So I put my .htaccess file in the same directory: var/www/web_sites/testsite.com/web/.htaccess In my .htaccess file, it says: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) index.php However, I also tried this instead: RewriteEngine on RewriteRule ^(main.php.*)$ $1 [L] RewriteRule ^([^\./]*(&.*)?)$ main.php?page=$1 [L] However, neither syntax work.When I put a link inside index.php that says <a href="page">page</a>, and I click on the link, I expect it should go back to index.php, which has code for taking "page" out of $_SERVER['PATH_INFO'] and displaying the right web page data.However, when I click the link, it says: NOT FOUNDThe requested URL /web_sites/thinkingworks.com/web/page was not found on this server.With the httpd.conf and .htaccess I have, shouldn't it have not found any directory called "page", then opened index.php?-- Dave M G
- Follow-Ups:
- Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache
- From: Godwin Stewart
- References:
- [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache
- From: Dave M G
- Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache
- From: David E
- Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache
- From: Dave M G
- Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache
- From: romans malinovskis
- Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache
- From: Dave M G
- Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache
- From: romans malinovskis
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache
- Next by Date: Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache
- Previous by thread: Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache
- Next by thread: Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links