Jump to content


Photo

SSL enabled mod_rewrite Stopped


Best Answer inversesoft123, 07 August 2014 - 03:06 AM

Fixed I just enabled mod_rewrite for SSL by editing vhost.conf or (ssl.conf may be in your case)


<Directory /home/wwwdir/public_html/>
AllowOverride All
</Directory>

Finally Resolved

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 inversesoft123

inversesoft123

    Advanced Member

  • Members
  • PipPipPip
  • 328 posts
  • LocationPune India

Posted 06 August 2014 - 10:09 AM

Hello All,

 

I have mod_rewrited working properly but when I enabled SSL it stopped working. Please help me its really frusterating now :)

 RewriteEngine On
 RewriteCond %{HTTPS} !=on
 RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
 RewriteRule ^shorter/(.*)$ shorter.php?longurl=$1 [L]
 RewriteRule ^([0-9a-zA-Z]{1,6})$ redirect.php?url=$1 [L]
 RewriteRule (.*)playlist.xml$  playlist.php [L] # Playlist
 RewriteRule ^(.*)/$ /index.php?page=$1 [L]
 RewriteRule ^(.*)/(.*)/$ /index.php?page=$1&id=$2 [L]
 RewriteRule ^(.*)/(.*)/(.*)/$ /index.php?page=$1&id=$2&no=$3 [L]
 RewriteRule ^(.*)/(.*)/(.*)/(.*)/$ /index.php?page=$1&id=$2&no=$3&trkid=$4 [L]
 RewriteRule ^(.*)/(.*)/(.*)/$ /index.php?page=my_profile&code=$2&state=$3 [L]

In this site redirects properly to https but it do not work with permalinks

http://www.domain.com/music/  << was working fine

https://www.domain.com/music/ << Now stopped

 

I Tried

RewriteRule (.*)playlist.xml$  https://%{SERVER_NAME}/playlist.php [L] # Playlist
#AND Optionally
RewriteRule (.*)playlist.xml$  https://www.domain.com/playlist.php [L] # Playlist

But no success

 

Please help


InverseSoft | Web Development India | Offshore Web Development Company

http://www.inversesoft.com/


#2 dalecosp

dalecosp

    Advanced Member

  • Members
  • PipPipPip
  • 307 posts
  • LocationJoplin, MO

Posted 06 August 2014 - 11:30 AM

RewriteCond %{HTTPS} !=on


?

:)
"God doesn't play dice" --- Albert Einstein
"Perl is hardly a paragon of beautiful syntax." --- Weedpacket

#3 inversesoft123

inversesoft123

    Advanced Member

  • Members
  • PipPipPip
  • 328 posts
  • LocationPune India

Posted 07 August 2014 - 03:06 AM   Best Answer

Fixed I just enabled mod_rewrite for SSL by editing vhost.conf or (ssl.conf may be in your case)


<Directory /home/wwwdir/public_html/>
AllowOverride All
</Directory>

Finally Resolved


InverseSoft | Web Development India | Offshore Web Development Company

http://www.inversesoft.com/





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com