Jump to content

Rewrite Not Working


znaji

Recommended Posts

Hi

 

Rewrite rules will not work on cheap hosted godaddy server however rewrite works locally. Can someone le me know whats wrong or the right way please.

 

Working locally but not hosted.

 

RewriteEngine on
RewriteBase /

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

#AddType application/x-httpd-php .php5 .php4 .php .php3 .php2 .phtml
#AddHandler x-httpd-php5-3  .php

RewriteRule ^profile/([a-zA-Z0-9_-]+)/comment/([0-9]+) statusview.php?s=$2&user=$1
RewriteRule ^profile/([a-zA-Z0-9_-]+)/notifications notifications.php?userid=$1
RewriteRule ^profile/([a-zA-Z0-9_-]+) profile.php?id=$1
RewriteRule ^create-account create-account.php
RewriteRule ^forgot-password forgot-password.php
RewriteRule ^about about.php
RewriteRule ^privacy privacy.php
RewriteRule ^terms-of-service terms-of-service.php
RewriteRule ^contact contact.php
RewriteRule ^login login.php
RewriteRule ^([a-z_-]+)/([a-z0-9_-]+)/([0-9]+) comment.php?subcat=$3
RewriteRule ^category/([a-zA-Z_-]+) category.php?cat=$1
RewriteRule ^how-it-works how-it-works.php
RewriteRule ^updates updates.php

 

Link http://www.example.com/profile/john does not work have to use

http://www.example.com/profile.php?id=john

to test.

Link to comment
https://forums.phpfreaks.com/topic/284865-rewrite-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.