Jump to content

[SOLVED] Mod Rewrite help


DeanWhitehouse

Recommended Posts

as a novice as well, here is what I used

 

Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteRule ^([A-Za-z0-9-]+)/?$ user/profile.php?user=$1 [L]

 

what is say is this: it allows the string to contain numbers and letters, it uses the file under the user directory called profile.php

 

then it takes the ?user=username, so it all comes out to site.com/username

I tried that wildteen, putting a / after home

site.com/Home/

 

And then also tried using your code, both produce 404 errors again.

 

How do i know if my server is set up correct (i am using WAMP)

 

@lamez, i am just doing basic rewriting ,e.g. page.php = /page/

 

So i don't that code yet.

This is wierd

RewriteRule  Home /Property-Agent/index.php [NC,L]
RewriteRule  News /Property-Agent/news.php [NC,L]
RewriteRule  Search /Property-Agent/search.php [NC,L]

 

Search and News causes 500 Internal Server Error

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

C:\wamp\www\Property-Agent\.htacccess

And all the site files are located there.

 

From the log

[Thu Oct 16 19:54:45 2008] [error] [client 127.0.0.1] script 'C:/wamp/www/news.php' not found or unable to stat

 

Thats the wrong path but the path i specified is

RewriteRule  ^News /Property-Agent/news.php [NC,L]

 

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.