Sorry if this has been answered before - just couldn't find a clear answer. I am on version 1.0.6
Is it possible to have URL Rewriting (mod_rewrite) without using .htaccess? I believe that with Apache you can have the equivalent rules in httpd.conf, but I wasn't sure if CMSMS itself requires there be an .htaccess file.
Thanks in advance.
URL Rewriting without .htaccess?
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: URL Rewriting without .htaccess?
if you have access to httpd.conf then you have 'god' access over the web server. the .htaccess stuff only works if the httpd.conf stuff (apache only of course) says that the specific directory can allow overrides of any type.
so, if you have access to httpd.conf, you need to do a heckuva lot of reading on the apache configuration files, it's syntax, and the permutations and combinations of all of the variables within that.
the .htaccess file allows only a limited subset of that, and only if the httpd.conf allows it to.
so, if you have access to httpd.conf, you need to do a heckuva lot of reading on the apache configuration files, it's syntax, and the permutations and combinations of all of the variables within that.
the .htaccess file allows only a limited subset of that, and only if the httpd.conf allows it to.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: URL Rewriting without .htaccess?
Thanks for the reply.
The issue I have is that my client's hosting provider does not allow .htaccess at all. However, they are willing to help me with getting rewrite rules in (in http.conf) - as long as it does not contain any filesystem calls. Unfortunately, the following rules (in documentation) does contain filesystem calls (the the -f and -d parts):
Looking around on these forums, folks have posted that if those two lines are taken out, it will still work. So the final rules would be:
Unfortunely, there's no way for me to test this. Just wanted to see if others have had success with this (before I go around and around with the hosting providers support folks). Thanks.
The issue I have is that my client's hosting provider does not allow .htaccess at all. However, they are willing to help me with getting rewrite rules in (in http.conf) - as long as it does not contain any filesystem calls. Unfortunately, the following rules (in documentation) does contain filesystem calls (the the -f and -d parts):
Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# 301 Redirect all requests that don't contain a dot or trailing
slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
-
Pierre M.
Re: URL Rewriting without .htaccess?
Hello,
Pierre M.
yes, I think those two lines allow to shadow your dynamic site behind static content : they give priority to the static content that could have same/similar URLs. So if you have not such static content, "it will still work" but back up is your friend.sv6 wrote: folks have posted that if those two lines are taken out, it will still work.
Pierre M.
Re: URL Rewriting without .htaccess?
Thanks for the insight. That's very helpful.

