I know this isnt the web development section, but I didnt know where to put it, and there isnt a general in web development (even though there should be), so ill post it here.
So I just started using mod_rewrite, and it seems to be working great, this is what I setup:
Thus "hosting-unlimited.html" will lead to "?view=hosting&subView=unlimited"
BUT.. now the 404 wont work
Example: http://amphosted.com/asdfasdfasdf Should be a 404.
Also.. Amp Hosted - Main is actually a path I need to be viewed, it shows a tutorial on using rvsitebuilder, but when I use mod_rewrite, it doesnt work, it shows the index.php page of the path before, obviously deformed in the fact that the script paths are incorrect.
Any ideas on how to fix this?
Mod_rewrite on .htaccess
Started by phpforfun, Nov 23 2008 11:42 AM
5 replies to this topic
#1
Posted 23 November 2008 - 11:42 AM
Checkout my new forum! http://adminreference.com/
|
|
|
#2
Posted 23 November 2008 - 01:57 PM
Can you post the mod_rewrite rules you are using.
Thanks
Thanks
Hope this helps
Graham - http://programmingtips.co.uk
Graham - http://programmingtips.co.uk
#3
Posted 23 November 2008 - 03:27 PM
JGRobinson said:
Can you post the mod_rewrite rules you are using.
Thanks
Thanks
Quote
options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)-group(.*).html index.php?view=$1&group=$2
RewriteRule ^(.*)-(.*)-(.*).html index.php?view=$1&subView=$2&to=$3
RewriteRule ^(.*)-(.*).html index.php?view=$1&subView=$2
RewriteRule ^(.*).html index.php?view=$1
RewriteEngine on
RewriteRule ^(.*)-group(.*).html index.php?view=$1&group=$2
RewriteRule ^(.*)-(.*)-(.*).html index.php?view=$1&subView=$2&to=$3
RewriteRule ^(.*)-(.*).html index.php?view=$1&subView=$2
RewriteRule ^(.*).html index.php?view=$1
Checkout my new forum! http://adminreference.com/
#4
Posted 25 November 2008 - 12:25 PM
#5
Posted 28 November 2008 - 01:28 PM
Hi,
sorry I've been away
the only think that I can think of is that your 'default' documents may be playing a part. for instance on the web server it may be checking amphosted/assdfffg/index.html which would then fall foul of the last rule.
sorry but this is the only idea I have.
sorry I've been away
the only think that I can think of is that your 'default' documents may be playing a part. for instance on the web server it may be checking amphosted/assdfffg/index.html which would then fall foul of the last rule.
sorry but this is the only idea I have.
Hope this helps
Graham - http://programmingtips.co.uk
Graham - http://programmingtips.co.uk
#6
Guest_Jordan_*
Posted 28 November 2008 - 03:22 PM
Guest_Jordan_*
I think your question was answered over at totalpenguin.com


Sign In
Create Account


Back to top









