Jump to content

Mod_rewrite on .htaccess

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
phpforfun

phpforfun

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,236 posts
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?
Checkout my new forum! http://adminreference.com/

#2
JGRobinson

JGRobinson

    Newbie

  • Members
  • PipPip
  • 22 posts
Can you post the mod_rewrite rules you are using.
Thanks
Hope this helps
Graham - http://programmingtips.co.uk

#3
phpforfun

phpforfun

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,236 posts

JGRobinson said:

Can you post the mod_rewrite rules you are using.
Thanks
OOPS! I thought I did, here they are.


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

Checkout my new forum! http://adminreference.com/

#4
phpforfun

phpforfun

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,236 posts
no ideas?
Checkout my new forum! http://adminreference.com/

#5
JGRobinson

JGRobinson

    Newbie

  • Members
  • PipPip
  • 22 posts
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.
Hope this helps
Graham - http://programmingtips.co.uk

#6
Guest_Jordan_*

Guest_Jordan_*
  • Guests
I think your question was answered over at totalpenguin.com