Jump to content

[SOLVED] Can't get mod rewrite to work


Greaser9780

Recommended Posts

RewriteEngine On
Options +FollowSymLinks
RewriteRule ^star/(.*).php  /star.php?name=$1 

I get no errors from this code but it doesn't actually rewrite the url.

I had to manually add the module in apache.

under my php.info it's showing the apache module. But I'm not sure if something should be showing under the php section or not.

Link to comment
Share on other sites

After many trial and error sessions, I got sick of my site shutting down everytime I tried an Apache rebuild. I finally contacted support to get things in order. They also reinstalled my GD2 library, although under the php info where it lists how it was configured it's not showing anything to do with mod rewrite. It's running CentOS 4.5. I still have the following code in my .htacess file but it's still not actually rewriting.

RewriteEngine On
Options +FollowSymLinks
RewriteRule ^pornstar/(.*).php /pornstar.php?name=$1 

Link to comment
Share on other sites

Finally I figured out how I am such an idiot. All this time I thought the rewrite was supposed to change the second value in the rule to the second. After banging my head against the wall reading tutorials on this from google I ran into one that finally showed me what I was doing wrong. I also had to figure out how to escape the %20 thing for spaces with streplace. Thanks for your patience Thorpe.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.