Loop Issue

Discuss practical ways rearrange URLs using mod_rewrite.

Loop Issue

Postby CanyonMule » Wed Feb 11, 2009 8:39 pm

Hello -

I've written the code for redirecting with .htaccess and it works just fine in the browser - both IE and Firefox - thanks to the explainations here. :D

The problem is when I use an SEO text browser. $1 repeats itself in the URL while on the redirected page

Example in Firefox:
domain.com/var1/var2

In SEO text browser:
domain.com/var1/var1/var2

Here's my .htaccess code:

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d

RewriteRule ^([^/\.]+)/?$ /index.php?q=$1 [QSA,L]
RewriteRule ^([^/\.]+)/([^/\.]+)/?$ /index.php?q=$1&s=$2 [QSA,L]
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /index.php?q=$1&s=$2&c=$3 [QSA,L]

Any help is greatly appreciated - thanks.
CanyonMule
 
Posts: 2
Joined: Wed Feb 11, 2009 8:27 pm

Postby richardk » Thu Feb 12, 2009 7:43 am

Mod_rewrite doesn't control the output of your script so it sounds like a problem with the SEO browser or relative paths.

FAQ: Relative paths to images, JavaScript, CSS and other external/linked files are broken.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby CanyonMule » Thu Feb 12, 2009 7:50 am

Thanks for your reply and your time Richard.
CanyonMule
 
Posts: 2
Joined: Wed Feb 11, 2009 8:27 pm


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 33 guests

cron