I am getting a freaking headache with this !

Oh, the strange things mod_rewrite does!

I am getting a freaking headache with this !

Postby 2levelsabove » Sun Dec 21, 2008 9:03 pm

when I click on http://alltherides.com/dealers/Motor_Ca ... ile_6.html

It takes me to a 404 not found.


RewriteRule ^.+_dealerprofile_([0-9]+)\.html$ /viewDealerProfile.php?id=$1 [QSA,L]


is notw orking for me.

WHat am I doing wrong?



Code: Select all
SetEnv TZ America/Houston


<Files .htaccess>
order allow,deny
deny from all
</Files>



AddHandler application/x-httpd-php5 .html .htm .shtml .xml
Options +FollowSymLinks
SECFILTERENGINE OFF
SECFILTERSCANPOST OFF

RewriteEngine On

RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^payment\.php$ https://alltherides.com%{REQUEST_URI} [R=301,L]

RewriteCond %{SERVER_PORT} !^80$
RewriteRule !^payment\.php$ http://alltherides.com%{REQUEST_URI} [R=301,L]

RewriteCond %{HTTP_HOST} !^alltherides\.com$ [NC]
RewriteRule ^(.*)$ http://alltherides.com/$1 [R=301,L]

RewriteRule ^.+_for_sale_([0-9]+)\.html$                  /viewlisting.php?id=$1                             [QSA,L]

RewriteRule ^.+-images([0-9]+)\.html$                     /viewallimages.php?id=$1                           [QSA,L]
RewriteRule ^.+_Reviews_([0-9]+)_([0-9]+)_([0-9]+)\.html$ /yearmakemodelreviews.php?year=$1&make=$2&model=$3 [QSA,L]
RewriteRule ^.+_Review_([0-9]+)\.html$                    /yearmakemodelreview.php?id=$1                     [QSA,L]
RewriteRule ^.+_Specifications_([0-9]+)\.html$            /modelspecification.php?id=$1                      [QSA,L]
RewriteRule ^.+_History_([0-9]+)\.html$                   /getManufacturerHistory.php?id=$1                  [QSA,L]
RewriteRule ^.+_Model_Info_([0-9]+)\.html$                /getModelHistory.php?id=$1                         [QSA,L]

RewriteRule ^.+_dealerprofile_([0-9]+)\.html$ /viewDealerProfile.php?id=$1 [QSA,L]



RewriteRule ^classifieds/$ /classifieds.php [NC,QSA,L]             
RewriteRule ^classifieds/([a-zA-Z0-9_-]+)/?$                      /classifiedsbymake.php?make=$1              [NC,QSA,L]
RewriteRule ^classifieds/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/?$         /classifiedsbymodel.php?make=$1&model=$2    [NC,QSA,L]




2levelsabove
 
Posts: 12
Joined: Sun Feb 03, 2008 11:38 pm

Postby 2levelsabove » Sun Dec 21, 2008 9:40 pm

grrrrr figured it out myself.

It was a stupid redirect on my target page.

Thanks anyways guys.

ohhh and you are more then welcome to suggest any improvements on my code.

Richard helped me quite a bit on it so I doubt it can be improved.

later
2levelsabove
 
Posts: 12
Joined: Sun Feb 03, 2008 11:38 pm


Return to Idiosyncrasies

Who is online

Users browsing this forum: No registered users and 5 guests

cron