Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-25-2012, 11:30 PM   PM User | #1
sharafatali
New to the CF scene

 
Join Date: Oct 2011
Location: Pakistan
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
sharafatali is an unknown quantity at this point
URL re-write not working for same filname to URL

Hi ,

I am having a strange issue

my website is running on demo
http://www.mydomain.com/demo

and i have following code in my htaccess

ErrorDocument 404 notfound.php
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^mydomain.com [nc]
rewriterule ^(.*)$ http://www.mydomain.com/$1 [r=301,nc]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^about$ about.php [L]
RewriteRule ^activate-user-(.*)-(.*) activate-user.php?bar=$1&med=$2 [L]
RewriteRule ^become-sponsor$ become-sponsor.php [L]
RewriteRule ^change-password$ change-password.php [L]
RewriteRule ^contact$ contact.php [L]


All the URLS are are working fine on my local machine, but when i uploaded to server, plain URLs are not working i get 404 error for them.
For example if i access http://www.mydomain.com/contact
same for change password and become sponsor.

URL with query string, like for activate-user is working fine.

I am not much experienced in URL re-writing.

Please help me, where i am wrong, how i can fix this problem.

Thanks
sharafatali is offline   Reply With Quote
Old 06-11-2012, 06:59 AM   PM User | #2
ssonawa
New Coder

 
Join Date: Jul 2008
Location: India
Posts: 39
Thanks: 0
Thanked 2 Times in 2 Posts
ssonawa is an unknown quantity at this point
Does any of above short URLs work fine on the server?

if not try and check if your rewrite module is enabled?

Also can you post your server's access logs for the incorrect urls?
ssonawa is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:54 AM.


Advertisement
Log in to turn off these ads.