Jump to content

.htaccess Question


Link

Recommended Posts

Try this .htaccess file

Options +FollowSymLinks

<IfModule mod_php4.c>
  php_value session.use_trans_sid 0
  php_value register_globals 1
  php_value display_errors 1
</IfModule>

RewriteEngine On
RewriteBase /httpdocs/                  // here given your uri path after given remove this comment from htaccess file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)/$ www.domain.com/dir/page.php?ec==$1

Link to comment
https://forums.phpfreaks.com/topic/63151-htaccess-question/#findComment-314748
Share on other sites

Shen, if I remove those lines, I get a page does not exist error.

 

DeadEvil, neither worked.

 

RewriteEngine on
RewriteRule ^(.*)  /home/eventron/public_html/events/index.php?ec=$1

 

The above brings up the index.php, but the files that are included in index.php aren't displaying properly probably because of directories and such.  Is there a way to forward to that address above rather than just displaying it through www.eventron.com/$1 ?

Link to comment
https://forums.phpfreaks.com/topic/63151-htaccess-question/#findComment-314778
Share on other sites

Sorry DeadEvil, but stick with me for just a second:

 

RewriteEngine on
RewriteRule ^([A-Za-z0-9]{6})  /home/eventron/public_html/events/index.php?ec=$1

 

That sets $ec = events....any clue why?  I want to check for a six character string that's not a file at www.eventron.com/STRING and then set that string to $ec in /events/index.php.  It can use redirect or whatever it needs to...

Link to comment
https://forums.phpfreaks.com/topic/63151-htaccess-question/#findComment-314787
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.