Jump to content

mandude

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mandude's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I figured it out! So I put this in the htaccess Options +FollowSymLinks +Indexes RewriteEngine on RewriteBase /offers RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^]+)/([^]+)$ index.php?item=$1&query=$2 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^.]+)$ index.php?item=$1 [L] # AddHandler application/x-httpd-php .php .htm .html subdomain was offers. I put that in that subdirectory (seems weird that I defined the directory but still had to put it in the directory) and now it works can be locked. this thread may be useful for others later
  2. Ok so like I said I dont know squat about coding. But I can see that if I put something like www.mysite.com/subfolder/index.php?item=something that "something" will be replaced in the document because item was defined (and in the index.php it tells it to replace item with item2 which is in the document) So I just have to figure out how to make the site know that anything after the /subfolder/ is the item. so mysite.com/subfolder/something that "something" is the item. Maybe that makes things clearer (maybe you already knew that) but I am not good with .htaccess files thanks again
  3. Just tried it, it did not work. will just say URL not found. Here is the htaccess file I had: Options +FollowSymLinks +Indexes RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^.]+)/([^.]+)$ index.php?item=$1&query=$2 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^.]+)$ index.php?item=$1 [L] # AddHandler application/x-httpd-php .php .htm .html RewriteEngine on # RewriteBase /offers RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^.*$ - [s=44] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [s=44] RewriteRule ^(.*)$ index.php?k=$1&%{QUERY_STRING}
  4. I don't know php at all. Someone helped me with what I have so far. Just to clarify, is there anything I need to change in that htaccess you just wrote, like specialpage.php to the subfolder or index.php thanks
  5. Not sure if that title encapsulates what I am trying to say, but basically I have the script that can work if the page is on the root of the domain with htaccess, but not in a subfolder. I just want an easy way to have it so if I type in a domain name such as: www.mysite.com/subfolder/hi that it will put "hi" in the page where I want. The code I had was something like: $item = $_GET['item']; if (!$item) $item = "test"; $item2 = str_replace("-", " ", $item); then in the page it would have <?=$item2;?> but I cant get it to work. help please!
×
×
  • 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.