Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1966 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

apache mod rewrite

Thread title: apache mod rewrite
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
10-16-2006, 02:44 PM
#1
derek lapp is offline derek lapp
Status: design rockstar
Join date: Jan 2005
Location: guelph, ontario
Expertise:
Software:
 
Posts: 2,246
iTrader: 0 / 0%
 

derek lapp is on a distinguished road

  Old  apache mod rewrite

i know a lot of people here were/are gung-ho on the whole clean-code/seo movement. whether you really believe in the mentality or your just reiterating what's already been said isn't important. people here know the tricks and i need your help.

i want to set up a site with "clean urls" instead of ?s and &s from peramiters. in other words, my end goal is to have the user type in/be linked to www.site.com/section/page and i could grab the peramiters as if it was served as www.site.com/index.php?sec=sections&page=page. i've been follwing a list apart article on it, and i understand the gist of breaking up the url at the / and getting the peamiters. the article i've been used for reference was http://www.alistapart.com/articles/succeed (notice the url)

the problem is, the htaccess file is being all screwy. when i try to access anything in the root folder, apache serves me a 500 internal server error - i found the error log and the error it is serving reads:


[Thu Oct 12 16:45:25 2006] [error] [client 127.0.0.1] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.
here's where it gets messed up.

i've placed everything inside a folder called test (c:\wamp\www\test\). now, i know the mod_rewrite module is working, because i activated it in my httpd.conf, i turned it on in htaccess and when i used the following code, everything redirected successfully:

Code:
Options +FollowSymLinks

RewriteEngine On

# test for mod_rewrite, /google --> http://www.google.com/
RewriteRule ^google$ http://www.google.com/? [R,L]
i then told it to redirect everything to the main wamp index.php file in the www folder (instead of www/test/index.php where the htaccess is stored) and it redirected fine.

it also redirected fine when i told it to redirect to another site's folder (www/springlake/index.php). it seems to only breaks when the redirection points to the same folder that .htaccess is in (www/test/index.php), which is the one i need it to point to. why it gets stuck in that infinate loop i don't know.

any help will be appreciated, i'm sure i can return the favour somehow.

     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed