Mod_rewrite Not Found Error
Contents |
here for a quick overview of the site Help mod_rewrite nc Center Detailed answers to any questions you might have Meta enable mod_rewrite ubuntu Discuss the workings and policies of this site About Us Learn more about Stack
Rewriterule Flags
Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Rewritebase
x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Can't get .htaccess mod_rewrite rules to work - 404 Not Found up vote 1 down vote apache enable mod_rewrite favorite 1 I'm trying to get a simple .htaccess rewrite rule to work, but I can't seem to work it out. My .htaccess looks like: RewriteEngine On RewriteRule ^api$ phpinfo.php ErrorDocument 404 /error.php php_flag display_errors on php_flag display_startup_errors on php_flag file_uploads on php_value error_reporting 2047 php_value max_input_time 60 php_value post_max_size 8M php_value upload_max_filesize 2M When I access /api, I get a 404 error saying that /api can't be found. My apache conf file looks like:
good to have such moments. I lost almost two hours fighting with a really really simple mod_rewrite rule in my .htaccess file. Here is the scenario. I'm working on a
The Requested Url Was Not Found On This Server.
ExpressionEngine based project. I'm in charge with the back-end and one of my colleagues apache mod_rewrite is responsible for the front-end stuff. He sliced the design and gave me the templates, .css, .js and image files. I decided to separate the assets from the templates and at the end my directory tree looks like that: /project /config /images/ /public / ... here are the .css, .js and image files /system /templates / http://stackoverflow.com/questions/16452839/cant-get-htaccess-mod-rewrite-rules-to-work-404-not-found ... here are the html files /themes /admin.php /index.php /.htaccess Everything works great except the fact that the paths to the things inside the public folder are actually referring the root directory. I.e. I had But it had to be: I didn't want to change every single path so I decided to use mod_rewrite to redirect all those request to the public directory. Even without http://krasimirtsonev.com/blog/article/mod_rewrite-one-simple-rule-and-two-stupidly-lost-hours-Request-exceeded-the-limit-of-10-internal-redirects-due-to-probable-configuration-error this problem I had to use .htaccess file, because by default the urls of ExpressionEngine are in format http://example.com/index.php/template_group/template But I wanted to be http://example.com/template_group/template Anyway, in the EE's user guide I found the exact syntax to accomplish this.
This is just an FYI that may help some people out with a minor headache that took me a few minutes to sort out. I've seen other posts in these forums about it, but they've since been closed, so I couldn't respond directly. Every page https://buddypress.org/support/topic/404-page-not-found-issues-mod-rewrite/ (except the homepage) on my BuddyPress install returned a 404 Page not found error… …the reason? I was too stupid to realize I should probably enable AllowOverride All so that mod_rewrite could, like, do something. I'm not sure if it'd help people out if BuddyPress did a "Clean Urls" check or something similar since mod_rewrite is required for it to work, it seems. It might help people through a headache like this. Viewing 11 replies - 1 through 11 (of not found 11 total) Paul GibbsKeymaster @djpaul 6 years, 10 months ago Thanks for the feedback zooney, that's a useful tip. Andrea RennickParticipant @andrea_r 6 years, 10 months ago Possibly it might help to do a check, but during install people are urged to make sure their WPMU install works. The issue you described above woudl have been immediately apparent without BP. The main blogs' post permalink's woudl not have worked. And despite how many warning given, people still miss it. (like mod_rewrite not found the big huge wall of text on the MU install screen) houmieParticipant @houmie 6 years, 9 months ago Ahh now I understand what the problem is. many thanks for that. My WordPress Mu wasnt actually working in first place, and had nothing to do with BuddyPress. However the question is; can I - being hosted by GoDaddy Windows Economy - access the config file of the webserver in order to make this little change? Many Thanks for help, Houman designodysseyParticipant @designodyssey 6 years, 9 months ago OK, I might be suffering from this if I knew what "this" was. My MU homepage works fine. When I go to the blog (there's only one for now) homepage it gives me header/footer/sidebar, but 404 where the body should be. In the sidebar, I can click on my about page and other pages I've added which show up with the mod-rewrite rule I made in admin. On the main homepage screen, I can click on the links for posts and the show up fine. It's only the blog homepage that I get these errors. My setup is a bit funny. Root directory has 2 files wp-config and htaccess and 2 folders /core and /wp-content. The blog homepage is pointing to /core whereas the site homepage is correctly root. I'm still testing on XAMPP for windows. Yes I did ask on MU forums, but since it came up here, I'd thought I'