.htaccess/mod_rewrite |
[eluser]Unknown[/eluser]
Good morning! After I don't know how much googeling and skimming forums I've decided to try to ask for help, so you guys are my hairs last hope before ripping it off. ![]() I've been struggeling with an url problem that seems pretty common and googled my fingers sore, done loads of trial and error without any luck at all. Anyho, I'm trying to do: http://127.0.0.1/private_html/devsite/about/ instead of http://127.0.0.1/private_html/devsite/index.php/about/ I get either 500-error from any page when I have RewriteBase pointed at any url besides just /, serverwise or httpwise. When I have RewriteBase pointed to just / I can access the site but once I try http.../devsite/about/ I get an 404 error. Sys/code info: Tried same code on 3 different servers (with similar configurations though), all debian based with latest php/apache/mysql versions. Apache2 is configured to allow mod_rewrite and it is enabled. .htaccess (saved in ascii on the server)(forums wont allow me to show all code but highlight all the white and it shows, strange) Code: RewriteEngine On config.php in CodeIgniter (for some reason the forum dont allow show the code but highlight all the white and it shows, strange) Code: $config['base_url'] = 'http://127.0.0.1/private_html/devsite/'; # Development apache2 error log Code: [Sun Feb 23 17:17:42 2014] [alert] [client 192.168.1.105] /var/www/private_html/devsite/.htaccess: <IfModule takes one argument, Container for directives based on existance of specified modules
[eluser]CroNiX[/eluser]
Your error messages are complaining about an <IfModule>, but the htaccess you posted doesn't contain that so I think the problem is elsewhere...perhaps in your main apache.conf? I would also urge you to learn how to create virtual servers with apache, so each one of your projects would have it's own unique domain, like 'project1.dev', 'project2.dev' instead of '127.0.0.1/some_dir/project1/' and not have to mess with a lot of this stuff. It would mimic your actual server more closely and alleviate some issues which you have to work around between development/production servers. Those htaccess rules you have regarding the /application and /system dir are way outdated and unnecessary. You should only really need: Code: RewriteEngine ON The /application and /system dir have contained their own htaccess file by default for years now which deny access directly from the URL. |
Welcome Guest, Not a member yet? Register Sign In |