Author Topic: htaccess issue  (Read 1029 times)

jmonroe

  • Active Member
  • ***
  • Posts: 63
  • Karma: +1/-0
htaccess issue
« on: December 05, 2015, 07:02:04 PM »
I have performed the following mods to my site because I noticed the profile links weren't working. When I add the code to htaccess file, I get a 403 forbidden error.

http://www.datemill.com/etano/wiki/doku.php?id=creating_clean_profile_url_s&s[0]=rewrite

Any suggestions? All my host is requiring is that the RewriteEngine On be listed at the top of the htaccess file before any rewrite commands.

Thanks

jmonroe

  • Active Member
  • ***
  • Posts: 63
  • Karma: +1/-0
Re: htaccess issue
« Reply #1 on: December 05, 2015, 08:02:51 PM »
Update, I have changed the htaccess a little bit and put Options -Indexes FollowSymLinks on the same line as I didn't notice it was separated. That rid the 403 errors. I have regenerated the skin files and tried to click on user profile to bring me to mysite.com/username but it still gives me

Not Found

The requested URL /jmonroe was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

maverick

  • Administrator
  • Veteran Member
  • *****
  • Posts: 3120
  • Karma: +210/-7
    • Maverick Webworks
Re: htaccess issue
« Reply #2 on: December 06, 2015, 08:43:59 AM »
 

The default htaccess code for profile URL's should look like this:
----------------------------------------------------------------------------
<IfModule mod_rewrite.c>
Options FollowSymLinks
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ profile.php?user=$1 [L]
</IfModule>
----------------------------------------------------------------------------

If your Etano site was installed in a sub-directory (or sub-folder) of your root directory (such as yoursite.com/subdirectory_name), you may need to also include another line above it like so:
----------------------------------------------------------------------------
RewriteBase /subdirectory_name <--- Change to the subdirectory name used on your server
<IfModule mod_rewrite.c>
Options FollowSymLinks
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ profile.php?user=$1 [L]
</IfModule>
----------------------------------------------------------------------------

Another potential issue is if your host has "mod_deflate" turned off in your hosting account, in which case you can try changing the following line:
Options FollowSymLinks
to this:
Options +FollowSymLinks -MultiViews

----------------------------------------------------------------------------

If it still doesn't work, you can also try removing the following lines from the htaccess file:

php_flag session.use_cookies on
php_flag register_globals off
php_flag session.use_trans_sid off

Fusion Responsive Template & Free Mods
http://www.maverickwebworks.com
DO NOT PM me asking for personal help. Post your problem or request in the forums so the entire community can contribute and benefit.

jmonroe

  • Active Member
  • ***
  • Posts: 63
  • Karma: +1/-0
Re: htaccess issue
« Reply #3 on: December 06, 2015, 10:57:24 AM »
I will try changing the Options. I don't have any of the php_flags in there.  And my site is in root not subdirectory. It's pretty strange. Thanks Maverick :-) I will update once i know something more.

jmonroe

  • Active Member
  • ***
  • Posts: 63
  • Karma: +1/-0
Re: htaccess issue
« Reply #4 on: December 06, 2015, 11:10:35 AM »
Changing my Options line to:

Options +FollowSymLinks -MultiViews

fixed it. Thanks again Maverick




The default htaccess code for profile URL's should look like this:
----------------------------------------------------------------------------
<IfModule mod_rewrite.c>
Options FollowSymLinks
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ profile.php?user=$1 [L]
</IfModule>
----------------------------------------------------------------------------

If your Etano site was installed in a sub-directory (or sub-folder) of your root directory (such as yoursite.com/subdirectory_name), you may need to also include another line above it like so:
----------------------------------------------------------------------------
RewriteBase /subdirectory_name <--- Change to the subdirectory name used on your server
<IfModule mod_rewrite.c>
Options FollowSymLinks
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ profile.php?user=$1 [L]
</IfModule>
----------------------------------------------------------------------------

Another potential issue is if your host has "mod_deflate" turned off in your hosting account, in which case you can try changing the following line:
Options FollowSymLinks
to this:
Options +FollowSymLinks -MultiViews

----------------------------------------------------------------------------

If it still doesn't work, you can also try removing the following lines from the htaccess file:

php_flag session.use_cookies on
php_flag register_globals off
php_flag session.use_trans_sid off

contactmy

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: htaccess issue
« Reply #5 on: June 26, 2018, 02:42:54 AM »
I just installed Digital Certificate on my website i find it difficult in coding the .htaccess. please what can i do

maverick

  • Administrator
  • Veteran Member
  • *****
  • Posts: 3120
  • Karma: +210/-7
    • Maverick Webworks
Re: htaccess issue
« Reply #6 on: July 06, 2018, 04:23:34 PM »
If you mean an SSL certificate for using the HTTPS protocol, you'll find instructions in the online documentation:

http://www.datemill.com/etano/wiki/doku.php?id=https_ssl_tls

Fusion Responsive Template & Free Mods
http://www.maverickwebworks.com
DO NOT PM me asking for personal help. Post your problem or request in the forums so the entire community can contribute and benefit.